六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 61|回复: 0

[转载]css默认样式+清除浮动+css压缩

[复制链接]

升级  2.8%

158

主题

158

主题

158

主题

进士

Rank: 4

积分
514
 楼主| 发表于 2013-1-29 07:48:19 | 显示全部楼层 |阅读模式
http://www.gracecode.com/Archive/Display/2523

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0}
table{border-collapse:collapse; border-spacing:0}
fieldset,img{border:0}
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}
ol,ul{list-style:none}caption,th{text-align:left}
h1,h2,h3,h4,h5,h6{font-size:100%; font-weight:normal}
q:before,q:after{content:''}
abbr,acronym{border:0}

http://www.gracecode.com/Archive/Display/1209
清除浮动

用空标签清除

.clr {clear: both;}

<div id="layout">
    <div id="left">Left</div>
    <div id="right">Right</div>
    <p class="clr"></p>
</div>

css压缩

使用 overflow 属性

#layout {overflow:auto; zoom:1;}

<div id="layout">
    <div id="left">Left</div>
    <div id="right">Right</div>
</div>

CSS压缩

http://www.osxcn.com/csstidy/?lang=zh-cn
http://www.cssdrive.com/index.php/main/csscompressor/
http://www.cleancss.com/
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表