
[純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);
});
}
});
~~~