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