css reset 重置样式介绍
前端  /  管理员 发布于 7年前   229
这个css reset代码是我自己在参考前人的基础上,并根据个人在多个实际项目中实战得出来的,在尊重标签本身用途的同时,又给予一些基本的实际需求。本reset只涉及常见的基本元素,以修正兼容为原则
复制代码代码如下:
/* -------------------------------------------------
* reset css
* -------------------------------------------------
*/
html{
height:100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
body{
margin:0;
padding: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{
margin:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
input, select, label {
vertical-align:middle;
}
img{
border: none;
}
a {
text-decoration:none;
}
p{
margin:0 0 9px 0;
}
/* hn */
h1,h2{
line-height:36px;
}
h3{
line-height:27px;
}
h4,h5,h6{
line-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{
margin: 0 0 18px 0;
padding:0;
}
ul li,ol li{
margin-left:25px;
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-bottom: 0;
}
ul.nostyle{
list-style: none outside none;
}
ul.nostyle li{
margin-left: 0;
}
ul.inline-style{
list-style: none outside none;
}
ul.inline-style li{
float:left;
display:inline;
margin-left:0;
}
dl{
margin-bottom: 18px;
}
dt{
font-weight: bold;
}
dd{
margin:0 0 0 9px;
padding: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;
}
122 在
学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号