Blogger Information
Blog 27
fans 1
comment 2
visits 90525
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
em和rem
          
Original
500 people have browsed it
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>1024作业</title>
  6. <link rel="stylesheet" href="../img/icomoon/style.css">
  7. <!-- 作业内容:-->
  8. <!-- 1. em,rem的特点是什么, 应用场景是什么?为什么推荐使用rem?-->
  9. <!-- 2. (选做) 使用rem + vw 重写 课程表 案例, css中不允许出现px,试试看-->
  10. </head>
  11. <body>
  12. <h3> 1. em,rem的特点是什么, 应用场景是什么?为什么推荐使用rem?</h3>
  13. <h4>em</h4>
  14. <p>em的特点:em是继承字号,永远在随自身和祖先元素,跟随游览器默认字体改变而改变!</p>
  15. <p>应用场景:PC端用em</p>
  16. <h4>rem</h4>
  17. <p>rem的特点:rem是根字号, rem与根元素绑定,字号常量不变</p>
  18. <p>应用场景:rem多用于移动端</p>
  19. <p>为什么推荐使用rem?</p>
  20. <p>因为rem是根字号,字号常量不变,rem作用于非根元素时,相对于根元素字体大小;rem作用于根元素字体大小时,相对于其出初始字体大小</p>
  21. </body>
  22. </html>

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