html的兼容性问题

1.浏览器默认的margin和padding不同:
解决方案:统一加margin:0,padding:0统一

2.让IE8独立识别
.bb{
background-color:red;//所有识别
.background-color:white //IE8识别

}

3.火狐只能使用getAttribute()来获取自定义属性
所以统一通过getAttribute()获取自定义属性

4.chrome默认最小字体为12px

5.IE下,没有pagex,pagey属性,只有x,y属性,只能注释标注

6.超链接访问过后hover样式就不出现了,被点击访问过的超链接样式不在具有hover,active

a:link{}
a:visited{}
a:hover{}
a:active{}

7.上下margin重合问题:养成良好编码习惯,统一用margin-top或者margin-bottom

猜你喜欢

转载自blog.csdn.net/qq_39594951/article/details/81396542