html5 javascript webpage responsive design scheme, webpage adaptation scheme

The style of the design of the web page is controlled by css. Our css size unit is generally px, or rem, or vw, vh.

The size controlled by px is fixed, not loudness.

Responsive design is generally implemented in two ways.

One.rem program.


1. Add in the head

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2. Introduce flexible.js
The content is as follows
 (function flexible(window, document) {   function resetFontSize() {     const size = (document.documentElement.clientWidth / 1920) * 37.5;//1920 is the width of the design draft = size + 'px';   }    // reset root

The post html5 javascript Web Responsive Design, Web Adaptation first appeared on Lenix Blog .

This article is reprinted from
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment