块级元素中,为什么 line-height 的值等于 height 的值才可以垂直居中。
<title>kongbai</title> <style> div { width: 100px; height: 50px; background-color: skyblue; line-height: 16px; font-size: 50px; } </style> 物料
初级自学 
块级元素中,为什么 line-height 的值等于 height 的值才可以垂直居中。
<title>kongbai</title> <style> div { width: 100px; height: 50px; background-color: skyblue; line-height: 16px; font-size: 50px; } </style> 1 yyyle Nov 5, 2019 |
2 NickBlablabla OP @yyyle 谢谢 |
3 memedahui Nov 5, 2019 |
4 NickBlablabla OP @memedahui 谢谢 |