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

比如.check1{vertical-align:top;margin-right:0\9;margin:2px3px00;*margin:-3px00-4px;_mar... 比如 .check1{ vertical-align:top; margin-right:0\9;margin:2px 3px 0 0; *margin:-3px 0 0 -4px; _margin:-5px 0 0 -4px;}
那加*呢?
展开
 我来答
匿名用户
推荐于2018-03-13
展开全部
IE6,IE7,IE8,Firefox兼容的css hack

补充:
color{
background-color: #CC00FF; /*所有浏览器都会显示为紫色*/
background-color: #FF0000\9; /*IE6、IE7、IE8会显示红色*/
*background-color: #0066FF; /*IE6、IE7会变为蓝色*/
_background-color: #009933; /*IE6会变为绿色*/
}
好多css hack,最重要的是简单实用能解决问题就行了
总结:
\9: IE6 IE7 IE8
*: IE6 IE7
_: IE6
*+: IE7
----------------------------------------
IE6,IE7,Firefox兼容的css hack
第一种办法:
body
{
background:red;
*background:blue !important;
*background: green;
}

第一排给Firefox以及其他浏览器看;
第二排给IE7,IE7既能能识别*号,也能识别important;
第三排给IE6也能识别*号;
第二种办法,使用_来区分IE6:

body
{
background:red;
*background:blue;
_background: green;
}

第一排给Firefox以及其他浏览器看;
第二排给IE7,IE7既能能识别*号;
第三排给IE6能识别下划线;
百度网友d92ec75
推荐于2016-08-04 · TA获得超过942个赞
知道小有建树答主
回答量:334
采纳率:0%
帮助的人:495万
展开全部
那种是针对IE6的的特殊写法,标准浏览器不支持的。
在当前IE6 IE7 FifeFox三分天下的情况下,浏览器兼容性问题成为网页设计者需要考虑的问题:

区别不同浏览器的CSS hack写法:
区别IE6与FF:background:orange;*background:blue;

区别IE6与IE7:background:green !important;background:blue;

区别IE7与FF:background:orange; *background:green;

区别FF,IE7,IE6:background:orange;*background:green !important;*background:blue;

注:IE都能识别*;标准浏览器(如FF)不能识别*;
IE6能识别*,但不能识别 !important;
IE7能识别*,也能识别!important;
FF不能识别*,但能识别!important;

另外再补充一个,下划线"_", IE6支持下划线,IE7和firefox均不支持下划线。

于是大家还可以这样来区分IE6,IE7,firefox :background:orange;*background:green;_background:blue;

参考资料: http://www.wutongxia.com/blog/a/css_ie_fireFox.html

本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式