1. 去除a标签下划线
a {
text-decoration: none;
}
2. 去除li标签前面小黑点
li {
list-style: none;
}
3. 让li标签横向排列
li {
float: left;
}
4. 垂直水平居中的方式
width: 100px;
height: 100px;
position: absolute;
left: 50%;
top: 50%;
margin: -50px 0 0 -50px;
实例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.a1 {
background-color: red;
border: 1px solid;
width: 150px;
height: 150px;
position: absolute;
left: 50%;
top: 50%;
margin: -75px 0 0 -75px;
}
.a2 {
background-color: green;
border: 1px solid;
width: 100px;
height: 100px;
position: absolute;
left: 50%;
top: 50%;
margin: -50px 0 0 -50px;
}
.a3 {
background-color: blue ;
border: 1px solid;
width: 50px;
height: 50px;
position: absolute;
left: 50%;
top: 50%;
margin: -25px 0 0 -25px;
}
</style>
</head>
<body>
<div class="a1">盒子1</div>
<div class="a2">盒子2</div>
<div class="a3">盒子3</div>
</body>
</html>
5.设置圆框边角
设置成圆形:
border-radius:50%;
设置某一个角:(左上角)
border-top-left-radius:50%;