html模板:
<div class="container"> <img src="img/1.png" alt="" style=" 100px;height: 100px;"> </div>
1.水平垂直居中
A.转化为表格单元格的形式
.container{ display: table-cell; width: 600px; height: 500px; vertical-align: middle; text-align: center; border: 1px solid black; }