Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common units in css3

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "what are the common units in css3". In daily operation, I believe many people have doubts about what are the common units in css3. Xiaobian consulted all kinds of information and sorted out simple and easy operation methods. I hope to help you answer the doubts about "what are the common units in css3"! Next, please follow the small series to learn together!

1.px: Absolute units, pages displayed in precise pixels

2.em: Relative unit. The reference point is the font size of the parent node. If font-size is defined by itself, it will be calculated according to itself (the default font of browser is 16px). 1em is not a fixed value in the whole page.

3.rem: Relative units, can be understood as "root em", relative to the font size of the root node html to calculate, CSS3 new attributes, chrome/firefox/IE9+ support.

vw: Viewpoint width, window width, 1vw = 1% of window width.

vh: Viewpoint height, window height, 1vh = 1% of window height.

vmin: The smaller of vw and vh.

vmax: The larger of vw and vh.

8.%: percentage

9.in: inch

10.cm: cm

11.mm: mm

12.pt point, approximately 1/72 inch

13.pc:pica, approximately 6pt, 1/6 inch

14.ex: take the height of x of the font currently working, calculate it as 0.5em if x height cannot be determined (IE11 and below are not supported, firefox/chrome/safari/opera/ios safari/android browser4.4+ and other attributes are required plus no prefix)

15.ch Based on the "0" character in the font used by the node, 0.5em(ie10+,chrome31+, safair7.1 +,opera26+,ios safari 7.1+,android browser4.4+ support)

At this point, the study of "what are the common units in css3" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report