css常用清除基础样式

/*(1)清除默认样式*/
html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img,input{ margin:0; padding:0; }
fieldset, img,input,button { border:0 none; padding:0;margin:0;outline-style:none; }   /*去掉input等聚焦时的蓝色边框*/
ul,li,ol{ list-style:none; }

/* 行内元素的垂直居中 */
/* 
vertical-align:top 

*/
select, input { vertical-align:middle;}
/*select, input, textarea { font-size:12px; margin:0; }*/
textarea { resize:none; } /*防止拖动*/
img {border:0; vertical-align:middle; }  
/*  去掉图片低测默认的3像素空白缝隙,或者用display:block也可以*/
/* table { border-collapse:collapse; } */

a {text-decoration:none; }

/*(2)添加公共样式*/
/*body {
    font:12px Arial,Verdana,"\5b8b\4f53";
    color:#666;
    background:#fff;
}*/
/*清除浮动(不管)*/
.clearfix:before,.clearfix:after {  /*清楚浮动*/
    content:"";
    display:table;
}
.clearfix:after{clear:both;}
.clearfix{
    *zoom:1;/*IE/7/6*/
}
h1,h2,h3,h4,h5,h6 {font-weight:normal;font-size:1em;}  /*设置h标签的大小,设置跟父亲一样大的字体font-size:100%;*/
s,i,em{font-style:normal;text-decoration:none;}




.clearfix:after {
    content: "";
    display: block;
    visibility: hidden;
    height: 0;
    clear: both;
}
.clearfix {
    zoom: 1;
}
a {
    text-decoration: none;
    color: black;
}
a:hover {
    text-decoration: none;
}

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值