CSS3 初始化的思路

/*css 初始化 begin */
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"; /*unicode(统一码)的写法,宋体的写法*/
	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 初始化 end*/

猜你喜欢

转载自onestopweb.iteye.com/blog/2316136