Home > front end >  Web design size does not accord with the actual size
Web design size does not accord with the actual size

Time:03-29

Code:


<meta charset="utf-8" & gt;
<meta name="viewport" content="width=device - width, initial - scale=1" & gt;
<meta HTTP - equiv="X - UA - Compatible" content="ie=edge" & gt;

<style type="text/CSS" & gt;
* {margin: 0; padding: 0; }
Div {margin: 10 px; width: 200px; height: 200px; Background - color: red; }
</style>

<body>



Use js to obtain relevant data: available width inconsistent with visible region width,
Screen resolution is: 1280 * 720,
Screen available size: 1280 * 680,
Web page visible region wide: 640,
Web page of text in full width: 640,

Div width is 200 px, 200 px high, but use the measuring tool measuring value is 400 * 400 px;
  • Related