目前而言firefox,opera,chrome等主流浏览器都已经支持border-radius属性,唯独IE8以及之前。
解决办法就是在用的border-radius属性的后面加上:behavior: url(ie-css3.htc);
XML/HTML Code复制内容到剪贴板
- <!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>
以上这篇浅析border-radius如何兼容IE就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持phpstudy。
—-想了解更多的linux相关异常处理怎么解决关注<计算机技术网(www.ctvol.com)!!>
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/htmltutorial/73617.html