Why do some websites set rem? according to the font-size of fixed html

Why do some websites set rem, by fixing the font-size value of html through css? isn"t setting rem the same as setting px directly?

Qunar: http://touch.piao.qunar.com/

Mar.28,2021

Direct px can also adapt, but it's much easier to use rem (sorry, I thought I first saw the rem written in rem,)


to solve the problem of mobile adaptation


to ensure that the same ui


you are right, the fixed one is the same as px. Maybe people will manually change ~


to set the font-size of html. You don't have to use js,. You can use css's media query to set the font-size, of html under different screens. Obviously, you say that yours belongs to the font-size of html under different screens.


because in order to facilitate calculation, 50px or 100px, depending on the size of the original design draft, you can refer to my article to understand. rem adapts to mobile devices

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b393d6-2c191.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b393d6-2c191.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?