CSS初始化示例代码

@charset "utf-8";

body,div,p,ul,dl,dt,dd,form,h1,h2,h3,h4,h5,h6,span,em,i,strong,a{padding: 0;margin: 0;}

body{font: 12px/1.5em tahoma,arial;}

input,form{background: none;}

ul,ol,dl{list-style: none;}

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

input:focus,button:focus{outline: none;}

strong{font-weight: normal;}

i,em{font-style: normal;}

.clear{clear: both;width: 0;height: 0;overflow: hidden;}

.wrap{width: 1180px;margin: 0 auto;}

.clearfix:after {content: "."; display: block; height:0; clear:both; visibility: hidden;}

可以在html头文件中直接引用,从而避免浏览器的不兼容带来的错误。

猜你喜欢

转载自blog.csdn.net/zifeiyubg/article/details/53708568