2012-06-27 114 views
0

我用这样的代码在IE和Firefox的伟大工程:CSS样式表只

.tytulmalykom { 
    color:#666666; 
    font-size:11px; 
    font-variant:small-caps; 
} 

我想使用此代码歌剧,只有Safari和Chrome:

.tytulmalykom { 
    color:#666666; 
    font-size:11px; 
    text-transform:uppercase; 
} 

我所有的样式表stylesheet.css中文件中。

到目前为止我用这么多的环节相对的:

<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]--> 
+1

如果这是你唯一的风格,为什么不只是简单地覆盖在你的IE CSS和FF CSS文本转换?默认情况下,Opera,Safari和Chrome会获得样式。 – TNC

+0

搜索'CSS hacks'得到像https://developer.mozilla.org/en/CSS/@document结果 – biziclop

+0

我不工作。我已经添加了第二代码既ie7.css和firefox.css仍然'文本转换:正在使用uppercase'。 – Spacedust

回答

0

这里我做了什么来解决这个问题:

我在每一页上添加:

<style type="text/css"> 

@-moz-document url-prefix() { 
    .tytulmalykom { font-variant:small-caps; text-transform:none } 
} 
</style> 

然后

in stylesheet.css:

.tytulmalykom { 
    color:#666666; 
    font-size:11px; 
    text-transform:uppercase; 
} 

和ie7.css:

.tytulmalykom { 
    font-variant:small-caps; 
} 

没有别的需要firefox.css