之前写静态常用的是px,对这些有点模糊,搜索一下记下来。em和rem都是相对长度单位em是相对当前对象里面的文本的文字的尺寸比如里面的font-size是14px 那 2em就等于28pxrem是c3引进来的一个相对单位,类似em,不过不同于em相对当前对象,而是相对于html根元素,常用来做手机端的布局ps:绝大部分浏览器默认font-size是16px,最小font-size是12px Last modification:October 15, 2021 © Allow specification reprint Support Appreciate the author AliPayWeChat Like If you think my article is useful to you, please feel free to appreciate