1
<style>
   border-radius:10px;
</style>
<div class='radius'> <?= echo $score . 'score';?></div>

它在 IE8 中不起作用

4

4 回答 4

5

Internet Explorer 6-8 不支持 Border-Radius,在 IE 9 中使用border-radius:10px。

它可以与 Jquery 或 PIE CSS一起使用

HTML中添加 jquery.js 和 jquery.corner.js:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.corner.js"></script>

Javascript

$('.radius').corner();

对于边框半径:10px 使用

$('.radius').corner("10px");

更多示例:http: //jquery.malsup.com/corner/

演示 http://jsfiddle.net/vTXXD/

于 2012-06-22T23:45:57.640 回答
2

IE8 不支持它。如果你想让它在 IE8 中工作,你需要使用 hack

于 2012-06-22T23:38:31.510 回答
2

IE 9 之前不支持它。您需要使用PIE CSS 之类的东西。这将要求您在站点中添加一个 htc 文件,您的 css 将如下所示:

.radius {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    behavior: url(/PIE.htc);
}
于 2012-06-22T23:38:47.237 回答
1

border-radius是一个 CSS3 属性并且 IE8 不支持它(IE8 以下的任何东西都不支持它)。

但是,有一个名为css3pie的出色脚本增加了对 IE8 的支持。

于 2012-06-22T23:39:03.227 回答