* 是表示针对HTML的所有元素。
margin表示边框外面留的空白,后面的0表示不留空白。
padding表示边框内部带内容之间填充,后面的0表示不留空白。
border表示边框,后面的0px表示边框宽度为0像素,边框绘制方式none表示不绘制边框。
代码演示
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
ul{
list-style: none;
}
ul > li{
border: 1px solid blue;
width: 80px;
height: 40px;
text-align: center;
line-height: 40px;
float: left;
}
</style>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
<div style="clear: both;" ></div>
<a href="https://www.baidu.com/">百度</a>
</body>
</html>