[size=large][url]http://www.gracecode.com/Archive/Display/2523[/url]
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}
[url]http://www.gracecode.com/Archive/Display/1209[/url]
清除浮动
用空标签清除
.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压缩
[url]http://www.osxcn.com/csstidy/?lang=zh-cn[/url]
[url]http://www.cssdrive.com/index.php/main/csscompressor/[/url]
[url]http://www.cleancss.com/[/url]
[/size]
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}
[url]http://www.gracecode.com/Archive/Display/1209[/url]
清除浮动
用空标签清除
.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压缩
[url]http://www.osxcn.com/csstidy/?lang=zh-cn[/url]
[url]http://www.cssdrive.com/index.php/main/csscompressor/[/url]
[url]http://www.cleancss.com/[/url]
[/size]