Before writing H5 page will also encounter the adaptation problem, is through the media query 1.1 point adjustment, always feel very cumbersome, but has not been to think of solutions.
It took me a whole morning to study today. niche is just stepping into the front road of the small white, for the online big guy's explanation is very laborious to understand it .....
But still found a simple solution, refer to the link: 78712328 (thank you very much);
1!function(b, a) {2 varc =b.documentelement;3A =function() {4 varA =C.clientwidth;5A && (c.style.fontsize = a/375 * + "px")6 };7Window.addeventlistener ("Orientationchange"inchWindow? "Orientationchange": "Resize", A,!1);8B.addeventlistener ("domcontentloaded", A,!1)9} (document, window);
This method is used to change the size of the root element font-size dynamically, and to achieve the appropriate matching.
Through testing, the feeling of adaptation is still possible,
This is the first time to deal with it and to understand the rest of the practice.
H5-Mobile-side adaptation