1. For mobile devices only, use PX; 2. Use REM for the need to adapt a variety of mobile devices;
For example, you just need a device that's quite different in resolution, such as iphone and ipad.
REM Configuration reference:
HTML {font-size:10px} @media screen and (min-width:480px) and (max-width:639px) { html { font-size:15px }}@ Media screen and (min-width:640px) and (max-width:719px) { html { font-size:20px }} @media screen and (Min-wi dth:720px) and (max-width:749px) { html { font-size:22.5px }} @media screen and (min-width:750px) and ( MAX-WIDTH:799PX) { html { font-size:23.5px }} @media screen and (min-width:800px) and (MAX-WIDTH:959PX) { HTML { font-size:25px }} @media screen and (min-width:960px) and (max-width:1079px) { HTML { font-size:30px }} @media screen and (min-width:1080px) { html { font-size:32px }}
Mobile font Unit font-size Select px or REM