让 IE支持圆角的方法

时间:2023-03-09 06:20:02
让 IE支持圆角的方法

1、在你的网页加载 PIE.js 脚本。

注意,用IE专用的注释,防止非IE浏览器下载。
<!--[if lt IE 10]>
<script type="text/javascript" src="PIE.js"></script>
<![endif]-->
 
2、用js 调用:
$(function() {
    if (window.PIE) {
        $('.rounded').each(function() {
            PIE.attach(this);
        });
    }
});

3、在你的css里面用 behavior 引入PIE.htc

.div{ height:200px; width:200px; border-radius:20px; behavior:url('PIE.htc'); }