Principle: Using REM and JS:
1.js sets the font size of the HTML root node;
Window width/number of words per line
2, REM is the reference to the HTML node
<HTML><Head> <title></title> <MetaCharSet= "UTF8"> <Scripttype= "Text/javascript"src= "Jquery.min.js"></Script></Head><Body> <P>users in the browser can customize the default text size, if the use of PX, users themselves in the browser settings to change the text size, the page will not change. We can not exclude visually impaired users (such as myopia), elderly users will not do so, as a "humane care" front-end, we could fully consider these circumstances. Since it was introduced in the CSS preprocessing tool, this would hardly add any cost. Again, the response page is not just responding to different types of devices, but also responding to different user needs. </P> <P>Window width/number of words per line</P></Body></HTML>
P{font-size:2rem;}
$ (function() { fontSize (); $ (window). Resize (fontSize) })function fontSize () { var h = $ (window) . width ()/100; Console.log (h); $ ("HTML"). CSS ("font-size", H + "px");}
About font-size settings for responsive layouts