浏览器默认样式,书写页面注意地方

11 篇文章 0 订阅

body 有8PX的外边距

ul,ol ff有16PX 外边距,40内边距 外边距指上下,内边距指 padding-left

ul,ol ie有1em 外边距,30内边距 外边距指上下,内边距指 padding-left

li什么都没有

dl 16外边距

dd 40外边距 margin-left

ff下

h1 21px 上下边距,下同

h2 19  H估计与字体大小有关用,em

IE8

h1 0.67EM  上下边距,下同

h2 0.83EM  H估计与字体大小有关用,em

p 16PX


INPUT 标签一般有内边距  2PX


/*reset css*/
html{-webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;}  
body,h1,h2,h3,h4,h5,h6,p,dd,dl,ul,ol,th,td,fieldset,legend,form,textarea,select,input{padding:0; margin:0;}
article, aside, audio, canvas, footer, header, nav, section { display: block;}
img{border:none; vertical-align:top;}
a{text-decoration:none;}
li{list-style:none;}
i,em,strong{font-style: normal;font-weight: normal;}
table {border-collapse: collapse;border-spacing: 0;}

textarea{resize:none; overflow:auto}




.clearfix:after{ content:".";display:block; visibility:hidden; height:0; overflow:hidden; clear:both;}.clearfix{*zoom:1;}
.fl{float:left;display:inline;}.fr{float:right;display:inline;}.cl{clear:both;}.text-hide{text-indent:-9999px;}.b{font-weight: bold;}
.triangle{display: inline-block;height:0; line-height:0; width:0;margin:0 12px 0 7px; border:4px solid transparent; border-left-color:#e3263f;border-right:0; vertical-align: 0px;*vertical-align: middle;}
/*common*/


11.26注意问题

1 对于占满全屏的设计,记得要设body{min-width:xxx}不然RESIZE窗口大小会出现问题

2,IE6部题,用到PNG的图片,要在父级加个relative,不然有PNG图片会在左上角闪动

3, 对于用PNG解决的DD_PNG问题,最好不要在HOVER时才加载,要  在默认时加载,通过BG-POS让它看不见

4,一般不要让页面包裹一个DIV,原因,一,扩展难,二,页面是DIV读完,才渲染的,所以如果DIV内容很多,就会一开始都没显示出来,体验不好。。。


11.27 发现以前书写页面的问题

1 CSS代码空格不规范

2 CSS书写,一般 是先布局,再模块,把共同的抽出来

3 float 下margin-bottom 在IE67 失效问题隐患,解决是  用PADDING- BOTTOM   ,以前个人好像是用ZOOM解决










评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值