Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the use of html css using em

Shulou Source: shulou.com Published: 2022-06-01 04:59:29 10月03日 Update

Most people do not understand the knowledge points of this article "what is the use of html css using em", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article, "what is the use of em in html css?"

The nature of em:

1. The value of em is actually not fixed.

2. Em inherits the font size of the parent element and changes it absolutely according to the font size of the parent element.

Html css uses em to cripple the HTML source code for the unit instance:

Percentage of css em unit usage body {background:#333; font-size: 62.5%; margin: 0px; padding: 0px;} / * set the background, ink, edge, etc. * / div {background:#fff; width:450px; height:180px; margin:0 auto;padding:10px; border:4px # 000 solid; font-size:1.2em;} of the page

Body setting equipment font-size: 62.5%; setting equipment equipment font-size:1.2em for div, which is equal to my font size equal to 12px.

The above is about the content of this article on "what is the use of html css using em". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Tags: Content function size font elements units furnishings articles knowledge articles values most examples that is more nature steps source code percentage percentage Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux MariaDB OPPO Reno MySQL Huawei