不要使用
不要使用* { 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; }
ul,
ol {
list-style: none; }
a {
text-decoration: none; }
a:hover {
text-decoration: underline; }
legend {
color: #000; }
fieldset,
img {
border: none; }
button,
input,
select,
textarea {
font-size: 100%;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
hr {
border: none;
height: 1px;
}
.clearfix:after{
content: '';
display: table;
clear:both;
}
.clearfix{
*zoom
:1;
}
转载请注明原文地址: https://ju.6miu.com/read-13723.html