px2rem-core
/** * rem core * @param {remUnit, remLimit, original, listen, disableFontScale} conf config */ remUnit // Number; default: 100; example: remUnit:100, 1080px => 10.8rem; remLimit // Number; default: null; exceed 1080 1rem exchange fontSize, rem Unchanged; original // Number; default: 1080; original image size; listen // Boolean; default: false; listen window resize; disableFontScale // Boolean; default: false; Observe changes in system font size;
include
; //or var px2rem = ; //recommend: <HTML> <head> <script/>
run
;
combine postcss
//postcss.config.js plugins: remUnit : 100 //equal conf.remUnit