4-4案例应用

来源:4-6 案例应用

athena_nan

2018-01-14 17:05:42

为什么padding-top要设置为60,就能让P标签居中显示

background-color: black;
            width:100%;
            height: 90px;
            padding-top:60px;

写回答

1回答

慕侠4350456

2018-01-15

这里字体20px,其实60px应该不是完全居中的,老师写的是大概计算的居中的大小,如果想要完全的居中,建议还是采用line-height设为和height相同~

0

0 学习 · 36712 问题

查看课程

相似问题