#What is the html adaptive screen code?
html screen adaptation code is as follows:
<meta name="viewport" content="width=device-width, initial-scale=1" />
Parameter explanation:
viewport is the default width and height of the web page, the above line The meaning of the code is that the width of the web page is equal to the screen width by default (width=device-width), and the original scaling ratio (initial-scale=1) is 1.0, that is, the initial size of the web page occupies 100% of the screen area.
Compatibility settings:
All major browsers support this setting, including IE9. For those older browsers (mainly IE6, 7, 8), you need to use css3-mediaqueries.js.
<!–[if lt IE 9]><script src=”http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js”></script><![endif]–>
Recommended learning: html tutorial
The above is the detailed content of What is the html adaptive screen code?. For more information, please follow other related articles on the PHP Chinese website!