HTML框架
<!DOCTYPE HTML> <!--[if IE 6]><html class="ie6 lte9 lte7 no-css3" lang="zh-cn"><![endif]--> <!--[if IE 8]><html class="ie8 lte9 no-css3" lang="zh-cn"><![endif]--> <!--[if IE 9]><html class="ie9 lte9 no-css3" lang="zh-cn"><![endif]--> <!--[if IE 7]><html class="ie7 lte9 lte7 no-css3" lang="zh-cn"><![endif]--> <!--[if !(IE 6) | !(IE 7) | !(IE 8) | !(IE 9) ]><!--><html lang="zh-cn"><!--<![endif]--> <head> <meta charset="UTF-8"> <title>无标题文档</title> </head> <body> </body> </html>
判断浏览器,添加所需文件
//为ie6-8添加一个ie.css文件 <!--[if lte IE 8]><link href="css/ie.css" type="text/css" rel="stylesheet" media="all"><![endif]--> //为ie6添加处理png的js文件 <!--[if IE 6]> <script type="text/javascript" src="js/DD_belatedPNG_0.0.8a-min.js?_v=<%=JS_VERSION%>"></script> <script type="text/javascript"> //给所有需要处理的png图片加上dd-pngifx这个class,就可以处理了 DD_belatedPNG.fix(".dd-pngfix"); </script> <![endif]-->
人如代码,规矩灵活;代码如诗,字句精伦。