How do you select a radio button in css?

前端 未结 3 1631
心在旅途
心在旅途 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 13:51

    you could use jQuery to select the input and add a class dynamically.

    Example (source: http://docs.jquery.com/Attributes/addClass#class):

    
    
    
      
    
      
      
    
    
      

    Hello

    and

    Goodbye

    [Edit]

    an alternative to jQuery is to use http://code.google.com/p/ie7-js/

    it fixes loads of issues with ie versions lower than 7 the fix that will interest you most is illustrated here:

    http://ie7-js.googlecode.com/svn/test/attr-value.html

提交回复
热议问题