We all know that IE 6,IE7,IE8 does not support the new attribute in CSS3, foreigners wrote a ie-css3.htc, mainly using the principle of VML, can let IE 6,7,8 support part of the CSS3 attributes, including: Border-radius (Fillet), Box-shadow (Shadow), Text-shadow (Text shadow).
It's easy to use, look at the following sample code:
code is as follows |
copy code |
.box { -moz-border-radius:15px; /* Firefox */ -webkit-border-radius:15px/* Safari and Chrome */ border-radius:15px/* Opera 10.5+ , as well as using the IE-CSS3 IE browser */ -moz-box-shadow:10px 10px 20px #000;/* Firefox */ -webkit-box-shadow:10px 10px 20px #000; * Safari and Chrome */ box-shadow:10px 10px 20px #000/* Opera 10.5+, and IE-CSS3 IE browser */ Behavio R:url (IE-CSS3.HTC); /* Notify IE browser invoke script action on ' box ' class */ } |
You can see that, in addition to the last addition of behavior, the CSS3 attribute is the CSS3 property, which does not require makeup, retouching or incarnation as a transformer, which is also the advantage of this method.
PS:HTC files must be placed on the server, the local test is not! And considering the performance problem, try not to use the HTC file.