使用PIE.htc 进行IE兼容CSS3


步骤:

1、引入文件。注意PIE.htc文件和css文件要放在同一个目录下;

2、在css元素中加上  behavior:url(pie.htc);

3、可以愉快的写css hack啦 ,这时需要的圆角平移等等部分css3属性在ie6\7\8上都可以展示出来

<!DOCTYPE html>    
<html>    
<head>    
    <title></title>    
<style type="text/css">    

   .container{  
   width:250px;  
   height:250px;  
   background-color:#34538b;  
   -moz-border-radius:5px;
   -webkit-border-radius:5px;
   box-border-radius:5px;
   behavior:url(pie.htc);  
   }  
</style>    
   
</head>    
<body>    
    <div class="container"></div>  
</body>    
</html> 

 


免责声明!

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



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