Internet Explorer中一直引起许多网页设计师和开发者之间的麻烦,无论是由于不正确执行(甚至所有)的某些功能,对齐问题,甚至语法以及其他浏览器之间的遵守。然而,济南网站建设告诉你一些很容易的“黑客”,专门针对某些版本的Internet Explorer。虽然我强烈建议您不要使用这些技巧(因为它们可能不会被未来证明),这是很有益的学习这些情况下,你可能需要使用原型或为一个特定的临时目的。当然,最好的办法是始终使用条件语句(下面我将展示)。
工具/原料
总之,这里有一定的方式,针对特定版本的Internet Explorer:
步骤/方法
1
2
IE8 body{ background-color: blue; /* all browsers */ background-color: red\0/; /* IE8 only */ background-color: red\9; /* IE8 and below */ }
3
IE7 body{ background-color: blue; /* all browsers */ *background-color: red; /* IE7 and below */ }
4
IE6 body{ background-color: blue; /* all browsers */ _background-color: red; /* IE6 specifically */ }
5
Target all of IE
6
Target IE 6 specifically Target IE 6 and up
7
Target IE 8 and below
注意事项
综合到CSS中使其完美兼容各种浏览器,。
上一篇:云筹最新玩法