border-radius如何兼容IE


目前而言firefox,opera,chrome等主流浏览器都已经支持border-radius属性,唯独IE8以及之前。

解决办法就是在用的border-radius属性的后面加上:behavior: url(ie-css3.htc);

ie-css3.htc问价下载地址:http://pan.baidu.com/s/1hsGt8e4

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>border-radius兼容IE</title>
    <style>
        .d1{
            width: 5em;
            height:5em;
            background: #e4393c;
            /*防止浏览器版本过低*/
            -moz-border-radius: 50%;
            -webkit-border-radius: 50%;
            border-radius: 50%;
            /*解决IE*/
            behavior: url(ie-css3.htc);
        }
    </style>
</head>
<body>
    <div class="d1"></div>
</body>
</html>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM