码迷,mamicode.com
首页 > Web开发 > 详细

2016.7.23 css初始化

时间:2016-07-23 20:57:12      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:

/*css 初始化 */
html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img {
    margin: 0;
    padding: 0;  }
fieldset, img, input, button {
    border: none;
    padding: 0;
    margin: 0;
    outline-style: none; /*去掉input 获取焦点后的外框环绕*/
}
ul, ol {
    list-style: none;  }

/*去掉原样式中的小黑点*/
input {
    padding-top: 0;
    padding-bottom: 0;
    font-family: "SimSun", "宋体";  }
select, input {
    vertical-align: middle;  }
/*输入字居中显示*/
select, input, textarea {
    font-size: 12px;
    margin: 0;  }
/**/
textarea {
    resize: none; /*去掉右下角*/
}

/*防止拖动*/
img {
    border: 0;
    vertical-align: middle; /*  去掉图片底部默认的3像素空白缝隙*/  }
table {
    border-collapse: collapse; /*合并外连线*/  }

body {
    font: 12px/150% Arial, Verdana, "\5b8b\4f53"; /*unitedCode的写法,宋体的写法*/
    color: #666; /*150%基于当前字体尺寸的百分比行间距*/
    background: #fff;  }

.clearfix:before, .clearfix:after {
    /*清除浮动,最好最标准的写法*/
    content: "";
    display: table;
}

.clearfix:after {
    clear: both;
    visibility: hidden;/*保留位置*/  }

.clearfix {
    *zoom: 1; /*IE/7/6*/  /*兼容IE6下的写法*/  }

a {
    color: #666;
    text-decoration: none;
}

a:hover {
    color: #C81623;
}

h1, h2, h3, h4, h5, h6 {
    text-decoration: none;
    font-weight: normal;
    font-size: 100%;
}

s, i, em {
    font-style: normal;/*将原有的样式去掉*/
    text-decoration: none;/*去掉下划线,但也可以去掉中划线(贯穿线)*/
}

.col-red {
    color: #C81623 !important;/*京东主色调*/
}

/*公共类*/
.w {
    /*版心 提取 */
    width: 1210px;
    margin: 0 auto;
}

.fl {
    float: left;
}

.fr {
    float: right;
}

.al {
    text-align: left;
}

.ac {
    text-align: center;
}

.ar {
    text-align: right;
}

.hide {
    display: none;
}

/*css初始化完成*/

直接复制粘贴拿来用

2016.7.23 css初始化

标签:

原文地址:http://www.cnblogs.com/huoan/p/5699461.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!