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 > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the HTML size unit". In the daily operation, I believe that many people have doubts about what the HTML size unit is. The editor consulted all kinds of data and sorted out a simple and easy-to-use method of operation. I hope it will be helpful for you to answer the question of "what is the HTML size unit?" Next, please follow the editor to study!
The unit used to describe size is the unit of size.
For example, the size of the description text, the height of the description lines, the width of the description div, the spacing between lines, and so on.
Different elements may have different units of size, such as pixel / em/ percentage for font size, pixel / percentage for div width, and so on.
Use pixels to set the text size, as follows:
Font-size: 30px
Use em to set the font size as follows:
Font-size: 3.75em
Em units are equivalent to multiples, 1em is equal to the current font size, and the default text size for browsers is 16 pixels, so the default size for 1em is 16 pixels, and 3.75em is 60 pixels.
Note: the so-called current font size refers to the font size of the current element, if the current element does not define the font size, it is equal to the font size of the parent element of the current element.
The so-called parent element refers to the element above the nesting relationship of the current element.
For example, introduction
You can calculate that the font size of the element div is 60px.
From this, it can be concluded that the pixel is absolute and is not affected by the superior-subordinate relationship, while the em is affected by the superior-subordinate relationship and should be used according to the specific situation.
Exercise:
Add the font-size attribute to the style of body, then change the font-size attribute of div to em units, and adjust the value in two ways.
Html, the full name of html, is a markup language that contains a series of tags. Through these tags, you can unify the format of documents on the network and connect scattered Internet resources into a logical whole. Html text is a descriptive text composed of html commands, and html commands can explain text, graphics, animation, sounds, tables, links, etc. Mainly used with css+js to build elegant front-end web pages.
At this point, the study on "what is the size unit of HTML" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.