首页
/
每日頭條
/
生活
/
設置網頁文本行高的屬性是
設置網頁文本行高的屬性是
更新时间:2024-10-01 15:27:43

設置網頁文本行高的屬性是?在CSS中,line-height被用來控制行與行之間垂直距離 ,現在小編就來說說關于設置網頁文本行高的屬性是?下面内容希望能幫助到你,我們來一起看看吧!

設置網頁文本行高的屬性是(怎麼設置網頁文本行高)1

設置網頁文本行高的屬性是

在CSS中,line-height被用來控制行與行之間垂直距離。

行間距與半行間距,還是取決于CSS中的line-height。默認狀态,浏覽器使用1.0-1.2 line-height, 這是一個初始值。你可以定義line-height屬性來覆蓋初始值:p{line-height:140%}

你可以有5種方式來定義line-height。

line-height可以被定義為:body{line-height:normal;}

line-height可以被定義為:body{line-height:inherit;}

line-height可以使用一個百分比的值body{line-height:120%;}

line-height可以被定義為一個長度值(px,em等) body{line-height:25px;}

line-height也可以被定義為純數字, body{line-height:1.2}

Comments
Welcome to tft每日頭條 comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments
Copyright 2023-2024 - www.tftnews.com All Rights Reserved