多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
![](https://box.kancloud.cn/9cee8dd9f20e6305aeb00ccca4e1c307_959x678.jpg) [纯css3画哆来A梦](http://www1.pconline.com.cn/pcedu/specialtopic/css3-doraemon/) **示例链接:** http://www.lsxm.tech/doc/demo/hack.html ## 一.hack技术 ### 相同的css属性,用不同的css写法让不同的浏览器识别 ### IE6:_selector{property:value;} ### IE7:+selector{property:value;} ### IE8:selector{property:value\0;} ### IE6 & IE7:*selector{property:value;} ### IE9& IE10:selector{property:value\9\0;} ### IE6 & IE7 & IE8& IE9& IE10:selector{property:value\9;} ~~~ 只在IE下生效 <!--[if IE]> 这段文字只在IE浏览器显示 <![endif]--> 只在IE6下生效 <!--[if IE 6]> 这段文字只在IE6浏览器显示 <![endif]--> 只在IE6以上版本生效 <!--[if gte IE 6]> 这段文字只在IE6以上(包括)版本IE浏览器显示 <![endif]--> 只在IE8上不生效 <!--[if ! IE 8]> 这段文字在非IE8浏览器显示 <![endif]--> 非IE浏览器生效 <!--[if !IE]> 这段文字只在非IE浏览器显示 <![endif]--> ~~~ ## 二.IE VML渲染 ### 让IE6/7/8支持css3,PIE.htc https://my.oschina.net/u/858398/blog/100525 http://css3pie.com/ #### **原理:** IE浏览器利用特定的矢量绘图语言的脚本(VML)重建本身不支持的CSS3这些属性(例如阴影和倒角等) ~~~ <!--[if lt IE 9]> <script type="text/javascript" src="path/to/PIE.js"> </script> <![endif]--> $(function() { //具有css3样式的元素加入class="css3" if (window.PIE) { $('.css3').each(function() { PIE.attach(this); }); } }); ~~~