天天看点

如何解决css样式表在不同浏览器中显示效果不同的问题

一种简单的办法就是采用:使用ie专用的条件注释

<!--其他浏览器 -->

<link rel="stylesheet" type="text/css" href="css.css" />

<!--[if ie 7]>

<!-- 适合于ie7 -->

<link rel="stylesheet" type="text/css" href="ie7.css" />

<![endif]-->

<!--[if lte ie 6]>

<!-- 适合于ie6及一下 -->

<link rel="stylesheet" type="text/css" href="ie.css" />