*{ padding:0; margin:0; } ol,ul,li{ list-style:none; } img{ border:none; } h1,h2,h3,h4,h5,h6{ font-size:12px; font-weight:normal; } input,select{ vertical-align:middle; } table { border-collapse: collapse; border-spacing: 0; empty-cells:show; } .cf:before, .cf:after { content:""; display:table; } .cf:after { clear:both; } .cf { zoom:1; } .clear{ clear:both; } body { color:#333; font:12px/20px Arial, "宋体", sans-serif; } a { color:#333; text-decoration:none; outline:none; } a:hover{ text-decoration:underline; color:rgb(2,45,137); } i{ display:inline-block; vertical-align:middle; margin:0 5px; } .lt{ float:left; } .rt{ float:right; }
其中cf用来清除浮动,添加于浮动标签的父级标签
i,常用来做小图标(可查看新浪腾讯等大网站都是这么做的,使用率相当高),提前重置,需要小图标的地方只需要加上background和width、height就可以了
lt,rt用来左浮动和右浮动