当前位置:网站首页>The difference between PX EM rem
The difference between PX EM rem
2022-07-04 05:41:00 【It's a fish, a small meatball, a duck】
Catalog
px
Relative length unit , Relative to the screen resolution of the monitor
There is a browser incompatibility issue
em
Relative length unit , Equivalent to the font size of the text in the current object
em The value is not fixed ,em Will inherit the size of the parent element
It is easy to cause confusion in font setting
If his parent set font-size by 10px, that 1em Equal to paternal 10px,2em Equal to paternal 20px, And so on
We don't usually use em, If the parent element is deleted , Then he will look for his father -> Parent , Therefore, it is particularly easy to cause confusion in font settings
Rem
Relative length unit , Relative to the root node html Font size to calculate , The default font height of any browser is 16px
If html The root node sets the font font-size by 100px. be 1em=100px. 2em=200px. It's not about the parent font
Browser compatibility is better
边栏推荐
- Ping port artifact psping
- Principle and practice of common defects in RSA encryption application
- What is MQ?
- flink1.13 sql基础语法(二)join操作
- LM小型可编程控制器软件(基于CoDeSys)笔记二十一:错误3703
- The data mark is a piece of fat meat, and it is not only China Manfu technology that focuses on this meat
- Enterprise level log analysis system elk (if things backfire, there must be other arrangements)
- Integer type of C language
- JS string splicing enhancement
- BUU-Real-[PHP]XXE
猜你喜欢
Just do it with your hands 7 - * project construction details 2 - hook configuration
Arc135 C (the proof is not very clear)
光模块字母含义及参数简称大全
Supplement the JS of a video website to decrypt the video
ETCD数据库源码分析——初始化总览
谷歌 Chrome 浏览器将支持选取文字翻译功能
[high concurrency, high performance and high availability of massive data MySQL practice-7] - memory data drop disk
如何使用postman实现简单的接口关联【增删改查】
c语言经典指针和数组笔试题解析
Kubernets first meeting
随机推荐
Talk about the SQL server version of DTM sub transaction barrier function
(4) Canal multi instance use
接地继电器DD-1/60
JS string splicing enhancement
VB. Net GIF (making and disassembling - optimizing code, class library - 5)
Basic concept of bus
Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
Input displays the currently selected picture
基于单片机的太阳能杀虫系统
[high concurrency, high performance and high availability of massive data MySQL practice-7] - memory data drop disk
How to clone objects
fastjson
input显示当前选择的图片
Notepad++ -- display related configurations
Leetcode 184 Employees with the highest wages in the Department (July 3, 2022)
Simulink与Arduino串口通信
Solar insect killing system based on single chip microcomputer
[paper summary] zero shot semantic segmentation
Excel comparator
Halcon图片标定,使得后续图片处理过后变成与模板图片一样