gpt4 book ai didi

CSS if 语句……对吗?

转载 作者:技术小花猫 更新时间:2023-10-29 11:16:17 24 4
gpt4 key购买 nike

我是条件 CSS 的新手。我的问题是,用它来处理跨浏览器问题是否正确?

例如:

#header
{
[if IE 7] width: 600px;
[if Webkit] width:300px;
}

Editor's note: OP is most likely using this: http://www.conditional-css.com/

最佳答案

对实际的 CSS 文件(或类)使用条件语句,但在 html 上。

例如:

<!--[if lte IE 6]>
<link href="css/layoutIE6.css" rel="stylesheet" type="text/css" />
<![endif]-->

这是写在html文件上的,不是CSS文件!

我认为您发布的格式实际上不起作用,我敢打赌它没有经过验证,所以它不是标准的。

关于CSS if 语句……对吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6101314/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com