Typography
Em(全身)
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://unitfyi.com/iframe/glossary/em-def/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://unitfyi.com/glossary/em-def/
Add a dynamic SVG badge to your README or docs.
[](https://unitfyi.com/glossary/em-def/)
Use the native HTML custom element.
定义
相对排版单位,等于当前元素的字体大小;在16 px上下文中,1 em等于16 px。
解释
Historically, the em was the width of the uppercase letter 'M' in a given typeface — since 'M' was typically as wide as it was tall, it approximated the point size. In modern CSS and digital typography, em is purely relative to font-size, making it useful for scalable layouts: setting padding to 1 em ensures it always scales proportionally with text. The related 'rem' unit is relative to the root element's font size instead.
01
RELATED CONVERSIONS
02
RELATED ARTICLES
03