Use double classes in IE6 CSS?

前端 未结 3 1064
猫巷女王i
猫巷女王i 2021-01-31 04:39

is there any way to make IE6 understand double classes, say I have a class MenuButton with a color class and possibly a clicked class; like :

.LeftContent a.Menu         


        
3条回答
  •  闹比i
    闹比i (楼主)
    2021-01-31 04:50

    If I use (like I wrote in the question), tag-specific rules, like .LeftContent a.MenuButton.Orange, it works...

    It only matches them if the classes in the selector are in the same order as the classes on the element.

    This isn't quite true. IE6 (and IE7 in Quirks Mode) only remembers one class per selector-part. If you write two, the second one overrides the first. So ‘a.MenuButton.Orange’ is identical in effect to ‘a.Orange’.

    So multiple class selectors do still have to be avoided for now.

提交回复
热议问题