1.所有标签水平居中:
行内标签与行内-块级标签水平居中:在其父标签设置:
text-align: center;
块级标签水平居中:在其本身设置:
margain: 0 auto;
2.所有标签垂直居中:
行内标签与行内-块级标签垂直居中:
line-height:xxx
块级标签垂直居中:在其本身设置:
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
text-align: center;
margain: 0 auto;
line-height:xxx
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
转载于:https://my.oschina.net/u/1581898/blog/755683