首页
IT
登录
6mi
u
盘
搜
搜 索
IT
通过设置文本的行高与外部容器的高度一致,可以使文本垂直居中
通过设置文本的行高与外部容器的高度一致,可以使文本垂直居中
xiaoxiao
2021-04-17
59
<!DOCTYPE
html
>
<
html
lang=
"en"
>
<
head
>
<
meta
charset=
"UTF-8"
>
<
style
>
/*
通过设置文本的行高与外部容器的高度一致,可以使文本垂直居中
*/
p
{
width
:
200
px
;
height
:
100
px
;
border
:
1
px solid red
;
text-align
:
center
;
line-height
:
100
px
; }
</
style
>
<
title
></
title
>
</
head
>
<
body
>
<
p
>
张甜甜
</
p
>
</
body
>
</
html
>
转载请注明原文地址: https://ju.6miu.com/read-674354.html
技术
最新回复
(
0
)