不要使用
不要使用* { margin: 0; padding: 0; }
不要完全照搬网上下载来的reset.css。
要根据具体需求,适量裁剪和修改后再使用。没用到的元素可以直接拿掉,减少代码量,避免影响渲染性能。
我的版本
body, h1, h2, h3, h4, h5, h6, hr, p,
dl, dt, dd, ul, ol, li,
pre,
fieldset, lengend, button, input, textarea,
th, td {
margin: 0;
padding: 0;
}
:focus {
outline: 1;
}
h1,h2,h3,h4, h5, h6 { font-size: 100%; }
small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
ul, ol { list-style: none; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
legend { color: #000; } /* for ie6 */
fieldset, img { border: none; } /* 让链接里的 img 无边框 */
button, input, select, textarea {
font-size: 100%; /* 使得表单元素在 ie 下能继承字体大小 */
}
table {
border-collapse: collapse;
border-spacing: 0;
}
hr {
border: none;
height: 1px;
}
.clearfix:after{
content: '';
display: table;
clear:both;
}
.clearfix{
*zoom:1;//激发hasLayout,兼容IE6/7
}