居中总结
居中:盒子在其包含快中居中
行盒(行块盒)居中
直接设置行盒(块)父元素 text-align:center
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div{
background-color: lightblue;
height: 100px;
text-align: center;
}
.inline-block{
display: inline-block;
width: 300px;
height: 50px;
background-color: red;
}
</style>
</head>
<body>
<div>
<a href="">超链接</a>
</div>
<div>
<span class="inline-block"</