我正在使用在 IE 和 Firefox 上运行良好的代码:
.tytulmalykom {
color:#666666;
font-size:11px;
font-variant:small-caps;
}
我只想将此代码用于 Opera、Safari 和 Chrome:
.tytulmalykom {
color:#666666;
font-size:11px;
text-transform:uppercase;
}
我所有的样式表都在 stylesheet.css 文件中。
到目前为止,我使用了很多链接 rel:
<link rel="stylesheet" href="files/stylesheet.css" type="text/css" />
<![if !IE]><link rel="stylesheet" type="text/css" href="files/firefox.css" media="screen" /><![endif]>
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="files/ie7.css" /><![endif]-->
最佳答案
这是我为解决这个问题所做的:
我在每个页面上添加了:
<style type="text/css">
@-moz-document url-prefix() {
.tytulmalykom { font-variant:small-caps; text-transform:none }
}
</style>
然后
在 stylesheet.css 中:
.tytulmalykom {
color:#666666;
font-size:11px;
text-transform:uppercase;
}
和 ie7.css:
.tytulmalykom {
font-variant:small-caps;
}
firefox.css 中不需要其他内容
关于google-chrome - 仅适用于 Opera、Safari 和 Chrome 的 CSS 样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11234068/