日期:2014-05-17  浏览次数:20677 次

关于reset.css的一些思考与探究

项目多了,大家多会有自己积累的一些reset.css的经历或者自己改进的代码,其实初衷还是很简单的,达到复用重置浏览器的一些默认样式,实现跨浏览器兼容

?

1、最早关注的还是YUIReset CSS,?

?

在线的压缩版本地址:http://yui.yahooapis.com/3.4.1/build/cssreset/cssreset-min.css

?

直接上代码吧:

?

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 
	margin:0;
	padding:0;
}
table {
	border-collapse:collapse;
	border-spacing:0;
}
fieldset,img { 
	border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
	font-style:normal;
	font-weight:normal;
}
ol,ul {
	list-style:none;
}
caption,th {
	text-align:left;
}
h1,h2,h3,h4,h5,h6 {
	font-size:100%;
	font-weight:normal;
}
q:before,q:after {
	content:'';
}
abbr,acronym { border:0;
}
?