How do you select a radio button in css?

前端 未结 3 1766
心在旅途
心在旅途 2021-02-11 13:00

How do you select a radio button in CSS? The HTML I am working with is generated so I cannot add class or other attributes to it.

I found input[type=\"radio\"] on the

3条回答
  •  广开言路
    2021-02-11 14:02

    The attribute selector (input[type="radio"]) is the correct solution, widely supported by everything but IE6 :)

    If you have no ability to modify the HTML to inject classname support (or access to javascript to accomplish this) then your options are:

    A). to make sure your site doesn't depend on this, and allow IE6 to degrade gracefully.

    B). live without it

提交回复
热议问题