我已经习惯了对IE和非IE浏览器有单独规则的样式表.例如,我一直在使用CSS3 Pie在IE中生成圆角和渐变.
问题是IE 9支持圆角和渐变,不再需要这样的解决方法.如何重写我的样式表以确保行为仅适用于IE 8-而不是IE 9?
谢谢!
编辑:这是一个来自CSS3 Pie网站的示例,其中IE 9的规则是多余的:http: //css3pie.com/demos/tabs/
我正在尝试修复我的 TEXT 颜色的颜色,它只是 WHITE,所以颜色与背景相同,尽管它的颜色设置为:#1a6eb6 并且它在 #submenu ul li .text 中设置为相同的值我迷失了它,有人可以帮我吗?
我的 HTML:
<div class="submenu">
<ul>
<li><span class="text"><a href="#">DISKUSNÍ FÓRUM </a></span><span class="horizontal-arrow"></span><span class="vertical-arrow"></span></li>
<li><span class="text"><a href="#">KOMENTÁ?E </a></span><span class="horizontal-arrow"></span><span class="vertical-arrow"></span></li>
<li><span class="text"><a href="#">ZÁZNAM CHATU </a></span><span class="horizontal-arrow"></span><span class="vertical-arrow"></span></li>
<li><span class="text"><a href="#">UŽÍVATELÉ</a></span><span class="horizontal-arrow"></span><span class="vertical-arrow"></span></li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
我的CSS:
.submenu{
color: #1a6eb6;
display: inline-block;
height: 50px;
width:780px;
}
.submenu ul {
margin-left: 20px;
padding-left: 0px;
}
.submenu ul li{
list-style-position: inside; /* Bodka v novom riadku vo vnutry */
list-style-type: none; /* bez bodky */
background-image: …Run Code Online (Sandbox Code Playgroud) 我无法弄清楚原因.但是我有一些代码使用PIE.htc并且工作正常@ http://www.supadupawebdesign.co.uk/jersey但是当我把它粘贴在不同的服务器上时它不起作用:http://www.jerseyisland. co.uk
任何想法为什么这不起作用?看起来有点像服务器设置或其他东西.
我试图通过使用http://css3pie.com在IE中使用解决方法来获得圆角.我在我的css中包含以下内容,当页面加载时会加载.所有这些都在Joomla 1.5中加载.
.form_field {color:#222 !important; border:2px solid #333; background:#f4f4f4;-webkit- border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px; color:#fff; padding:2px 0px 2px 0px; position:relative; z-index:99999;
behavior: url(./PIE.htc);
Run Code Online (Sandbox Code Playgroud)
上面的代码保存在名为template.css的css文件中.
PIE.htc和PIE.php位于我网站的根目录中.
下面是在IE 9中加载页面并将渲染选择为IE 8渲染模式时生成的一些"视图源".
<link rel="stylesheet" href="/sos/plugins/system/rokbox/themes/light/rokbox-style.css" type="text/css" />
<link rel="stylesheet" href="/sos/components/com_gantry/css/gantry.css" type="text/css" />
<link rel="stylesheet" href="/sos/components/com_gantry/css/grid-12.css" type="text/css" />
<link rel="stylesheet" href="/sos/components/com_gantry/css/joomla.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/joomla.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/customstyle.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/extended.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/sos-styles.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/template.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/typography.css" type="text/css" …Run Code Online (Sandbox Code Playgroud)