一、首先需要下载一个文件PIE.htc
链接:http://pan.baidu.com/s/1mhRS7Le 密码:cd3n
二、使用例子
1、引入文件。注意PIE.htc文件和css文件要放在同一个目录下;
2、在css元素中加上 behavior:url(pie.htc);
3、可以愉快的写css hack啦 ,这时需要的圆角平移等等各种css3属性在ie8上都可以展示出来
附代码
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.box{
width:250px;
height:250px;
background-color:#34538b;
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
behavior:url(pie.htc);
}
.box{
width:250px;
height:250px;
background-color:#34538b;
-moz-box-shadow:1px 3px 3px #666;
-webkit-box-shadow:1px 3px 3px #666;
box-shadow:1px 3px 3px #666;
behavior:url(pie.htc);
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>