这个类在顺风 CSS 中接受很多值,其中所有属性都以类的形式覆盖。它是 CSS Line Height 属性的替代品。此类用于设置用于行的空间量,例如在文本中。不允许使用负值。
线高类:
- 前导3:此类将行高设置为 0.75rem。
- 前导4:此类将行高设置为1rem。
- 前导5:此类将行高设置为 1.25rem。
- 前导6:此类将行高设置为1.5rem。
- 前导7:此类将行高设置为 1.75rem。
- 前导8:这个类将行高设置为2rem。
- 前导9:此类将行高设置为 2.25rem。
- 前导10:此类将行高设置为2.5rem。
- 前导无:此类将行高设置为 1。
- Lead-tight:此类将行高设置为 1.25。
- 前导舒适:此类将行高设置为 1.375。
- 前导法线:此类将行高设置为 1.5。
- Lead-relaxed:此类将行高设置为 1.625。
- 前导松散:此类将行高设置为 2。
句法:
...
示例:在此示例中,我们将使用三个类leading-none、leading-normal和leading-loose 。您可以根据需要更改班级名称。
HTML
GeeksforGeeks
Tailwind CSS Line Height Class
leading-none:
How many times were you frustrated
while looking out for a good
collection of programming/algorithm
/interview questions? What did you
expect and what did you get?
GeeksforGeeks.
leading-normal:
How many times were you frustrated
while looking out for a good
collection of programming/algorithm
/interview questions? What did you
expect and what did you get?
GeeksforGeeks.
leading-loose:
How many times were you frustrated
while looking out for a good
collection of programming/algorithm
/interview questions? What did you
expect and what did you get?
GeeksforGeeks.