css line-height property
Translation results:
line
英[laɪn] 美[laɪn]
n. Line; row; row; boundary line
vt. Queue; use to mark a line; to line up; to line; to form a layer; to line up; to hit a straight ball
heightBritish [haɪt] American [haɪt]
n. Height; height, altitude; highland; top, apex
css line-height propertysyntax
Function: The line-height property sets the distance between lines (line height).
Description: This attribute will affect the layout of the line box. When applied to a block-level element, it defines the minimum distance between baselines in that element rather than the maximum distance. The calculated difference between line-height and font-size (known as "line spacing" in CSS) is divided into two halves and added to the top and bottom of a line of text content. The smallest box that can contain this content is a line box. The raw numeric value specifies a scaling factor, and descendant elements inherit this scaling factor rather than the calculated value.
Note: Negative values are not allowed.
css line-height propertyexample
<html> <head> <style type="text/css"> p.small {line-height: 90%} p.big {line-height: 200%} </style> </head> <body> <p> 这是拥有标准行高的段落。 在大多数浏览器中默认行高大约是 110% 到 120%。 这是拥有标准行高的段落。 这是拥有标准行高的段落。 这是拥有标准行高的段落。 这是拥有标准行高的段落。 这是拥有标准行高的段落。 </p> <p class="small"> 这个段落拥有更小的行高。 这个段落拥有更小的行高。 这个段落拥有更小的行高。 这个段落拥有更小的行高。 这个段落拥有更小的行高。 这个段落拥有更小的行高。 这个段落拥有更小的行高。 </p> <p class="big"> 这个段落拥有更大的行高。 这个段落拥有更大的行高。 这个段落拥有更大的行高。 这个段落拥有更大的行高。 这个段落拥有更大的行高。 这个段落拥有更大的行高。 这个段落拥有更大的行高。 </p> </body> </html>
Click the "Run instance" button to view the online instance
Popular Recommendations
- Command-Line Tools with Go: Piping Data
- XRP (XRP), SUI (SUI), and IntelMarkets (INTL): Which Coin Will Reach a New Height?
- NBA 2K25 jumpshot guide: All requirements and best jump shots for each player height
- LEAD Upstate Celebrates 10th Year of Line of Gratitude Event
- Casio reveals new G-Shock G-Line watches with tide charts
- Bitget Wallet Integrates Real-Time K-line Charts for TON Chain Tokens into Its Swap Feature