CSS if语句...是不是? [英] CSS if statements... is it right?
本文介绍了CSS if语句...是不是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新的条件CSS。我的问题是,使用它来处理跨浏览器问题是否正确?
I'm new with the conditional CSS. My question is, is it right to use it for dealing with cross-browsers issues?
例如:
#header
{
[if IE 7] width: 600px;
[if Webkit] width:300px;
}
编辑说明:OP最有可能使用此功能: http://www.conditional-css.com/
推荐答案
使用条件语句实际的CSS文件html。
Use conditional statements for the actual CSS files (or classes) but on the html.
像这样:
<!--[if lte IE 6]>
<link href="css/layoutIE6.css" rel="stylesheet" type="text/css" />
<![endif]-->
这是写在html文件,而不是CSS文件!
This is written on the html file, not the CSS file!
您发布的格式我认为实际上不工作,我打赌它不验证,所以它不是标准。
The format you posted I think doesn't actually work and I bet it doesn't validate so it is not standard.
这篇关于CSS if语句...是不是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文