css样式重置(css样式初始化): 是为了代码在各浏览器保持兼容性,表现效果一致,这是由于不同浏览器对某些标签的默认样式不一致,而且也是为了开发的方便和效率也有必要初始化。
对于某些汉字则推荐使用unicode编码代替:
宋体:\5B8B\4F53
新宋体:\65B0\5B8B\4F53
黑体:\9ED1\4F53
微软雅黑:\5FAE\8F6F\96C5\9ED1
楷体_GB2312:\6977\4F53_GB2312
body,
th,
td,
form,
input,
button,
select,
option,
textarea,
p,
ul,
ol,
li,
dl,
dt,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
legend,
fieldset,
pre,
blockquote,
hr {
padding: 0;
margin: 0;
}
input,
button,
textarea,
select {
outline: none;
font: 100%/1.5 'microsoft YaHei', '\5b8b\4f53', sans-serif;
}
body {
font: 12px/1.5 'microsoft YaHei', '\5b8b\4f53', sans-serif;
color: #333;
background: #fff;
}
img {
border: 0; /* ie下的默认黑边框 */
vertical-align: middle; /* 图片下的间隙,也可以用display: block */
}
a {
color: #666;
text-decoration: none;
}
a:hover {
color: #c81623;
}
button {
border: 0;
cursor: pointer;
border-radius: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
em,
i {
font-style: normal;
}
b,
strong {
font-weight: 0;
}
del,
s,
ins,
u {
text-decoration: none;
}
h1,h2,h3,h4,h5,h6{
font-weight: 400;
font-size: 100%;
}
.fl {
float: left;
}
.fr{
float: right;
}
.clearfix::before,
.clearfix::after{
content: '';
display: table;
}
.clearfix::after{
clear: both;
}
.clearfix {
*zoom: 1; /* 兼容旧版本ie */
}