让IE6支持CSS2.1选择器
让IE6支持CSS2.1选择器
虽然用各种CSS Hack,使我们的页面能在不同的浏览器中表现出相同的效果,但是CSS2.1的选择器却没有在IE6中正常解释的解决方案,放弃CSS2.1?写两个CSS,一个有CSS2.1选择器的IE7,FF等浏览器,然后再写一个IE6的CSS? < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=GB2312" /> <title>JsHack DEMO</title> <!--[if lte IE 6]><script type="text/javascript" src="http://www.miaoqiyuan.cn/js/iehack.js"> </script>< ![endif]--> <style type="text/css"> .test>strong{color:#6699FF} .test>div>strong{color:#FF0000} </style> </head> <body> <div class="test"> <strong>0000000000</strong> <div> <strong>1111111111</strong> <div> <strong>22222222222</strong> <div> <strong>3333333</strong> <div>4444444</div> </div> </div> </div> </div></body> </html> |