文字水平垂直居中
為什么我在
div{
???? width:300px;
???? height:300px;
???? border:1px solid red;
?? }
中添加
div{
???? width:300px;
???? height:300px;
???? border:1px solid red;
???? line-height:center;
??? text-align:center;
?? }
盒子中的box1和box2只是偏上居中,而不是水平垂直居中?
為什么我在
div{
???? width:300px;
???? height:300px;
???? border:1px solid red;
?? }
中添加
div{
???? width:300px;
???? height:300px;
???? border:1px solid red;
???? line-height:center;
??? text-align:center;
?? }
盒子中的box1和box2只是偏上居中,而不是水平垂直居中?
2016-05-23
舉報
2016-05-23
? ?line-height:center; 改成? ?line-height:300px;
2016-05-23
line-height:300px; text-align:center;
2016-05-23
line-height:300px;