<style>
border-radius:10px;
</style>
<div class='radius'> <?= echo $score . 'score';?></div>
它在 IE8 中不起作用
<style>
border-radius:10px;
</style>
<div class='radius'> <?= echo $score . 'score';?></div>
它在 IE8 中不起作用
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/
IE 9 之前不支持它。您需要使用PIE CSS 之类的东西。这将要求您在站点中添加一个 htc 文件,您的 css 将如下所示:
.radius {
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
behavior: url(/PIE.htc);
}
border-radius
是一个 CSS3 属性并且 IE8 不支持它(IE8 以下的任何东西都不支持它)。
但是,有一个名为css3pie的出色脚本增加了对 IE8 的支持。