css中有些属性的前面会加上“*”或“_”,请问分别表示什么意思?

给不同的浏览器识别

例如:

color{
         background-color: #CC00FF;     /*所有浏览器都会显示为紫色*/
         background-color: #FF0000\9;    /*IE6、IE7、IE8会显示红色*/
         *background-color: #0066FF;    /*IE6、IE7会变为蓝色*/
         _background-color: #009933;    /*IE6会变为绿色*/
}
body{

        background:red;        /*给Firefox以及其他浏览器看;*/
        *background:blue !important;   /*给IE7,IE7既能能识别*号,也能识别important;*/
        *background: green;   /*给IE6也能识别*号*/
}

猜你喜欢

转载自www.cnblogs.com/winbao/p/baidu.html