Search notes:
HTML tag: meta - viewport
The
viewport
instruction only affects mobile
browsers; it has no effect on desktops. It is especially useful for the so called
responsive design.
<meta name="viewport" content="width=1024" />
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.00, maximum-scale=0.75, user-scalable=0">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover"/>
width=
Specify the size of the viewport with a width=
declaration:
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta name="viewport" content="width=500">
<title>width = 500</title>
</head>
<body style='margin:0'>
<div style='width:250px;height:100px;margin-bottom:10px;border:blue 1px solid'>Width: 250px</div>
<div style='width:490px;height:100px;border:red 1px solid'>Width: 490px</div>
</body>
</html>