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 does text-indent:2em mean in css code

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

Share

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

This article mainly introduces the meaning of text-indent:2em in css code, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

What is the meaning of text-indent:2em in css code?

Standard answer: the first line of a paragraph is indented in 2em (em is a unit of relative length).

What is em here?

Here em is a unit, such as px (pixels) abnormal HTML length unit, em is called relative to the length unit.

Conversion between em and px

1em is 16px.

Here 2em=32px, phase is to set CSS indentation 32px.

Understand the conversion instructions between html length unit EM and PX:

Em refers to the high font, the default font of any dabbling device is high, but 16px. Unmediated readers all match: 1em=16px.

Pixels and centimeters can not be directly converted, only need to explain the resolution (dpi) trick conversion

Often use 72dpi (computer display device) and 300dpi (photo)

72dpi 1cm = 28.346px 1em=16px=0.564cm=0.00564m

300dpi 1cm = 118.11px 1em=16px=0.135cm=0.00135m

Usually, these two units are not converted to each other, even if they are converted under the condition of a number of distinguishing rates.

Thank you for reading this article carefully. I hope the article "what is the meaning of text-indent:2em in css code" shared by the editor will be helpful to everyone? at the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you 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.

Share To

Development

Wechat

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

12
Report