欢迎来到天天文库
浏览记录
ID:19835320
大小:29.00 KB
页数:6页
时间:2018-10-06
《浏览器兼容性问题解决方法》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、浏览器兼容性问题解决方法一、HACK以下两种方法几乎能解决现今所有HACK。1,!important 随着IE7对!important的支持,!important方法现在只针对IE6的HACK.(注意写法.记得该声明位置需要提前.) 2,IE6/IE77对火狐*+html与*html是IE特有的标签,火狐暂不支持.而*+html又为IE7特有标签. 注意:*+html对IE7的HACK必须保证HTML顶部有如下声明: 二、万能float闭合关于clearfloat的原理可参见
3、[HowToClearFloatsWithoutStructuralMarkup]将以下代码加入GlobalCSS中,给需要闭合的div加上class="clearfix"即可,屡试不爽.beconsistentwithinthesamedisk.Alternateunifiedcorerequirementsplacedontheterminalstripterminals,onlineidentityandensurethecoppercoreisnotexposed.6.4.6enclosurewithinthesametothecablecoreprovidesbind
4、ingintoacircle,harnesstiespacingisgenerally100mm;branchofficesshallbebindingonbothends,eachcore 三、其他兼容技巧1,FF下给div设置padding后会导致width和height增加,但IE不会.(可用!important解决)2,居中问题.Ø垂直居中.将line-height设置为当前div相同的高度,再通过vertical-align:middle.(注意内容不要换行.)Ø水平居中.margin:0auto;(当然不是万能)3,若需给a标签内内容加上样式,需要设置display:block;(常见于导航标签)4,FF和IE对BOX理解的差异导致相差2px的还有设为float的div
6、在ie下margin加倍等问题.5,ul标签在FF下面默认有list-style和padding.最好事先声明,以避免不必要的麻烦.(常见于导航标签和内容列表)6,作为外部wrapper的div不要定死高度,最好还加上overflow:hidden.以达到高度自适应.beconsistentwithinthesamedisk.Alternateunifiedcorerequirementsplacedontheterminalstripterminals,onlineidentityandensurethecoppercoreisnotexposed.6.4.6enclosur
7、ewithinthesametothecablecoreprovidesbindingintoacircle,harnesstiespacingisgenerally100mm;branchofficesshallbebindingonbothends,eachcore7,关于手形光标.cursor:pointer.而hand只适用于IE.四、部分样式兼容技巧1针对火狐ie6ie7的css样式现在大部分都是用!important来hack,对于ie6和火狐测试可以正常显示,但是ie7对!im
此文档下载收益归作者所有