
<style>{margin:0;padding:0;}</style>建议做网站的时候,设置个resetcss样式表清除各个浏览器的默认样式,已达到做的网页在各个浏览器中达到统一,下面把YUI
Reset
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;
}a:hover{position:relative;top:50px;border:11px solid #CC9900;}
直接删掉这一句就好了,因为你的是放在 a标签里面的用不同的class来定义div;
<div class="wrap">
<div class="box"></div>
</div>
wrap { 定义wrap属性 }
box { 定义box属性 }
样式表不要定义成:wrap box { 定义box属性 } 这样box就一定会继承wrap的属性;
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)