reset.css样式清楚表 导入即可
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin:0; padding:0; }
body { background:#fff; color:#555; font-size:14px; font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif; }
td,th,caption { font-size:14px; }
h1, h2, h3, h4, h5, h6 { font-weight:normal; font-size:100%; }
address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal;}
a { text-decoration:none; }
a:hover { text-decoration:none; }
img { border:none; }
ol,ul,li { list-style:none; }
input, textarea, select, button { font:14px Verdana,Helvetica,Arial,sans-serif; }
table { border-collapse:collapse; }
html {overflow-y: scroll;}
.clearfix::after {content: "."; display: block; height:0; clear:both; visibility: hidden;}
.clearfix { *zoom:1; }
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!-- 设计页面开始 应该去除浏览器默认样式 -->
<link rel="stylesheet" href="./CSS/reset.css">
<style>
/*
*{
margin: none;
padding: none;
}
ul{
list-style: none;
} */
.box{
width: 200px;
height: 200px;
background-color:blue
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
本文介绍了一个简单的CSS样式重置方法,通过将所有元素的外边距和内边距设置为0,来消除不同浏览器默认样式的影响。此外,还提供了一些额外的样式规则,如统一字体大小和字体系列等。
4204

被折叠的 条评论
为什么被折叠?



