请帮助我需要wright风格的IE只有谁有谁知道它很好,我也想火狐特定的css,我试图显示像这样的东西

发布于 2013-08-30 17:41:18
在标题中放置类似以下内容的内容。
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->这将适用于您选择的任何浏览器,请考虑:
<!--[if lt IE 9]>
your css in here
<![endif]-->如果浏览器是ie 8或更低版本,这将显示您指定的规则。
发布于 2013-08-30 17:53:37
适用于任何mozilla的:
@-moz-document url-prefix()
{
// Styles for mozilla goes here
}对于特定的IE,请使用以下。这里是IE 8
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="ie8specific.css" />
<![endif]-->适用于IE 7和更低版本的
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="ie7-and-down.css" />
<![endif]-->适用于IE 7和更高版本的
<!--[if gt IE 6]>
<link rel="stylesheet" type="text/css" href="ie7-and-up.css" />
<![endif]-->或
<!--[if gte IE 7]>
<link rel="stylesheet" type="text/css" href="ie7-and-up.css" />
<![endif]-->如果您想在IE中使用内联CSS,那么可以在条件之间添加样式,而不是链接到CSS文件。
<!--[if gte IE 7]>
<style>
// Style for IE 7 and higher versions.
</style>
<![endif]-->发布于 2013-08-30 17:44:58
对于IE,您可以使用:
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="iespecific.css" />
<![endif]-->对于mozilla,您可以使用:
<style type="text/css">
@-moz-document url-prefix() {
h1 {
color: red;
}
// all styles for mozilla alone
}
</style>https://stackoverflow.com/questions/18529692
复制相似问题