如何垂直居中标签的文字?
http://codepen.io/mildrenben/pen/uypnI
超级基本示例:
HTML:
<div>
<a>W</a>
</div>
CSS:
* {
margin: 0;
padding: 0;
}
html, body {
height: 100%;
}
div {
float: left;
height: 20%;
width: 100%;
background: pink;
}
a {
float: left;
height: 100%;
width: 20%;
background: papayawhip;
text-align: center;
}