CSS with if/then browser logic

前端 未结 7 1225
清酒与你
清酒与你 2021-01-05 19:37

For browsers < IE7, I want to use a certain style attribute, while for other browsers I\'d like to use another. Can I do this using a single css file, or do I have to do

7条回答
  •  长发绾君心
    2021-01-05 20:08

    Here's an example how you can include an IE6-specific CSS to override specific CSS classes for IE 6 or lower:

    
     
    

    Alternatively, you can do it on per-element basis like this:

     
     
    

    MSDN has some more details about IE Conditional Comments support.

提交回复
热议问题