兼容处理

浏览器内核

*Trident : IE 浏览器
*Gecko :Mozilla浏览器 firefox
*Webkit : Safari 浏览器,chrome浏览器,360急速浏览器


取消默认行为 或规定统一行为

 html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu{
    margin:0;padding:0;
}
header,footer,section,article,aside,nav,hgroup,address,figure,figcaption,menu,details{
    display:block;
}
table{
    border-collapse:collapse;border-spacing:0;
}
caption,th{
    text-align:left;font-weight:normal;
}
html,body,fieldset,img,iframe,abbr{
    border:0;
}

li{
    list-style:none;
}
del,ins,u,s,a,a:hover{text-decoration:none;}
body,textarea,input,button,select,keygen,legend{
    font:12px/1.14 arial,\5b8b\4f53;
    color:#333;outline:0;
    border:0px;
}
a,a:hover{color:#333;}
a,button{cursor:pointer;}

IE hark 的使用

其他符号 lt-小于 lte-小于等于 gte-大于等于

特殊兼容

+块属性标签float后,在IE6显示margin比设置的大
解决:设为 display:inline;display:table;
+不同浏览器会有line-height 默认 ,当设置高度小于他时应该修改他
+img 可能有默认间距
解决:采用float布局img

posted @ 2017-03-07 12:46  打响武昌第二枪  阅读(103)  评论(0编辑  收藏  举报