Blogger Information
Blog 9
fans 0
comment 0
visits 3474
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
聊聊em,rem
手机用户284061708
Original
425 people have browsed it

em、rem学习总结

  • 特点

em 的意思是“父元素的字体大小”。带有 ems 类的元素从它们的父元素中获取大小。

rem 单位的意思是“根元素的字体大小”。(“根 em”的 rem 标准。)<ul>内的<li>元素和一个 rems 类从根元素 (<html>)中获取它们的大小。这意味着每一个连续的嵌套层都不会不断变大。


  • 应用场景

1、 em多用于PC端
2、 rem多用于手机端


  • 为什么软件使用rem?

因为rem根字号, 字号常量不变,除非人为更新,否则不变

Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:总结的不错
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post