CSS样式初始化

/*样式初始化*/
body,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
blockquote,
dl,
dt,
dd,
ul,
ol,
li,
pre,
form,
fieldset/*fieldset 元素可将表单内的相关元素分组*/,
legend,
input,
button,
textarea,
p,
blockquote,
th,
td
{
  margin:0;
  padding:0;
  outline: 0;
  /*outline (轮廓)是绘制于元素周围的一条线,位于边框边缘的外围,可起到突出元素的作用。*/
  font:inherit;
  /*inherit 关键字指定一个属性应从父元素继承它的值。*/
    vertical-align: baseline;/*baseline 默认。元素放置在父元素的基线上。*/
}
 
body {
  font: 14px/1.5 "Helvetica Neue",Helvetica,Arial,"Microsoft Yahei","Hiragino Sans GB","Heiti SC","WenQuanYi Micro Hei",sans-serif;
  color: #333;
  min-width: 1226px
}
 
a{
  color:#555;
  text-decoration: none;
}
 
a:hover{
  text-decoration: underline;
}
 
img{
  border:none;
}
 
ol,ul,li{
  list-style: none;
}
 
table{
  border-collapse: collapse;/*为表格设置合并边框模型*/
}
 
/************共用样式***********/
 
 
/*清除盒子浮动*/
 
.clear:after{
  content: ".";
  display: block;;
  height: 0;
  clear: both;
  visibility: hidden;
}
 /*zoom:1让IE6的元素可以清除浮动来包裹内部元素*/
.clearfix{
  zoom:1;
}
 
.clearfix:before,clearfix:after{
  content:"";
  display:table;
}
 
.clearfix:after{
  clear: both;
}

.fl{
  float: left;
}
 
.fr{
  float: right;
}
 
/***************共用背景**********/
 
.web-icon{
  background-image: url(../images/icon.png);
  background-repeat: no-repeat;
  display: inline-block;
}
 
.ico{
  width:15px;
  height:16px;
  background-position: 3px 5px;
  position:relative;
  top: 3px;
}

posted @ 2021-04-07 15:38  Nature161  阅读(145)  评论(0编辑  收藏  举报