在IE7 / IE8中创建圆角 [英] Creating rounded corners in IE7 / IE8

查看:174
本文介绍了在IE7 / IE8中创建圆角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个圆角标签,它在IE9,Mozilla和Chrome中正常工作,但在IE7 / IE8中不行。

I am creating a rounded corners tabs, that works fine in IE9, Mozilla and Chrome, but not in IE7/IE8.

这里是代码: p>

Here is the code:

<div id="navbar">
<div id="holder">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">News</a></li>
</ul>
</div>
</div>



#navbar {}
#holder {
border-bottom:1px solid #000;
overflow:hidden;
}

#navbar #holder ul {
margin:0;
padding:0;
list-style:none;
margin-top:15px;
}

#navbar #holder ul li { }
#navbar #holder ul li a {
text-decoration:none;
float:left;
margin-right:5px;
border:1px solid #000;
padding:15px;
text-align:center;
width:90px;
border-bottom:none;
display:block;
behavior:url(border-radius.htc);
border-radius:5px 5px 0 0;
}

#navbar #holder ul li a:hover {
background:#C09;
color:#fff;
}

请让我知道代码,使其适用于IE7 / IE8以及?

Can you please let me know the code so that it works for IE7/IE8 as well?

推荐答案

IE 7/8不支持 border-radius 。我听到IE9。

IE 7/8 do not support border-radius. I hear IE9 does though.

这个网站包含一个黑客在IE7 / 8中获得圆角边框: http://dimox.net/cross-browser-border-radius-rounded-corners/ 。您需要下载border-radius.htc并将以下代码放入CSS中:

This site contains a hack for getting rounded borders in IE7/8 though: http://dimox.net/cross-browser-border-radius-rounded-corners/ . You'll need to download border-radius.htc and put the following code in your CSS:

.rounded-corners {
  behavior: url(http://yoursite.com/border-radius.htc);
}

这篇关于在IE7 / IE8中创建圆角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆