In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to set p label line spacing in html". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "html how to set p label line spacing" bar!
Html sets the line spacing of the p tag by adding the line-height attribute to the paragraph text and setting a reasonable line spacing value, such as [p.small {line-height:70%;}], which means to set the line spacing to 70 percent of the current font.
This article operating environment: windows10 system, html 5, thinkpad T480 computer.
It's actually very easy to set the line spacing of the p tag because there is a ready-made property line-height in css, which makes it so easy to set line spacing. Maybe many students are not aware of this attribute, so let's take a look at it.
The line-height property is used to set the row height as a percentage.
The common property values for this property are as follows:
Normal defaults. Set a reasonable spacing between lines.
Number sets the number, which is multiplied by the current font size to set line spacing.
Length sets a fixed spacing between lines.
% is based on the percentage line spacing of the current font size.
Inherit states that the value of the line-height attribute should be inherited from the parent element.
Let's take a look at the code example:
(www.php.cn) p.small {line-height:70%;} p.big {line-height:200%;}
This is a paragraph with standard line height.
This is a paragraph with standard line height.
The default line height for most browsers is about 110% to 120%.
This is a smaller paragraph with a higher line.
This is a smaller paragraph with a higher line.
This is a smaller paragraph with a higher line.
This is a smaller paragraph with a higher line.
This is a larger paragraph with a higher line.
This is a larger paragraph with a higher line.
This is a larger paragraph with a higher line.
This is a larger paragraph with a higher line.
The running effect is shown in the following figure:
At this point, I believe you have a deeper understanding of "how to set p-label line spacing in html". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.