what does \ mean in a css hex color notation?

前端 未结 2 1910
心在旅途
心在旅途 2021-01-04 04:52

I\'m curious what something like this means in CSS:

background-color: #080808 \\9;

I know the hex c

2条回答
  •  梦谈多话
    2021-01-04 05:11

    2 CSS Rules Specific to Explorer (IE CSS hacks)

    Another option is to declare CSS rules that can only be read by Explorer. For example, add an asterisk (*) before the CSS property will target IE7 or add an underscore before the property will target IE6. However, this method is not recommended because they are not valid CSS syntax.

    IE8 or below: to write CSS rules specificially to IE8 or below, add a backslash and 9 (\9) at the end before the semicolon.
    

    Found here. I must give credit to @Zoltan because I didn't know what to google till he posted.

    It also has some other examples of IE specific web stuff. Like conditional comments which help when wanting to load things only in IE to handle IE unique cases.

提交回复
热议问题