css reset 重置样式介绍

网站建设 2023-01-28 20:49www.1681989.com免费网站
这个css reset代码是我自己在参考前人的基础上,并根据个人在多个实际项目中实战得出来的,在尊重标签本身用途的,又给予一些基本的实际需求。本reset只涉及常见的基本元素,以修正兼容为原则

复制代码
代码如下:

/ -------------------------------------------------
reset css
-------------------------------------------------
/
html{
height:100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
body{
marg:0;
paddg:0;
font:12px/1.5 Helvetica, Arial, sans-serif;
background-color:#fff;
height:100%;
text-align:center;
color:#404040;
}
h1,h2,h3,h4,h5,h6,p,blockquote,form,fieldset{
marg:0;
}
table {
border-collapse:collapse;
border-spacg:0;
}
put, select, label {
vertical-align:middle;
}
img{
border: none;
}
a {
text-decoration:none;
}
p{
marg:0 0 9px 0;
}
/ hn /
h1,h2{
le-height:36px;
}
h3{
le-height:27px;
}
h4,h5,h6{
le-height:18px;
}
h1{
font-size:24px;
}
h2{
font-size:20px;
}
h3{
font-size:16px;
}
h4{
font-size:14px;
}
h5,h6{
font-size:12px;
}
/ ul ol dl /
ul,ol{
marg: 0 0 18px 0;
paddg:0;
}
ul li,ol li{
marg-left:25px;
}
ul ul,
ul ol,
ol ol,
ol ul {
marg-bottom: 0;
}
ul.nostyle{
list-style: none outside none;
}
ul.nostyle li{
marg-left: 0;
}
ul.le-style{
list-style: none outside none;
}
ul.le-style li{
float:left;
display:le;
marg-left:0;
}
dl{
marg-bottom: 18px;
}
dt{
font-weight: bold;
}
dd{
marg:0 0 0 9px;
paddg:0;
}
/ html5 /
article, aside, dialog, figure, footer, header,
hgroup, nav, section {
display:block;
}
/ clearfix /
.clearfix:before, .clearfix:after {
content:"";
display:table;
}
.clearfix:after{
clear:both;
overflow:hidden;
}
.clearfix{
zoom:1;
}

Copyright © 2016-2025 www.1681989.com 推火网 版权所有 Power by