What is viewport?
In computer graphics, the viewport is the visible area portion of a plane.
What is the relationship that the viewport has with my web application?
When we talk about responsive web, viewport is the user visible area of a web page. Content that is not visible can only be viewed with a scroll, for example.
Realize that the viewport varies from device to device, for example on computers, tablets and mobile phones. It also varies, for example, when the user resizes the size of his browser on his operating system.
HTML5 has introduced the metatagenglish name="viewport"
, that lets the developer have control in the visible area of the browser.
There are also relative measures in the CSS that have the size of the viewport as a basis. See:
vw
: relative to 1% of the width of viewport
vh
: relative to 1% of the height of the viewport
vmin
: concerning 1% of the lowest viewport
vmax
: concerning 1% of the higher dimension of viewport
This greatly facilitates the development of 100% responsive pages.
There is only the viewport or there is something similar to her?
On the web there are two viewports. What is visible is called visual viewport. It is usually smaller than the viewport layout, which is the entire content. When a user gives zoom on the page with your mobile phone, for example, the viewport layout remains the same, who changes (in case decreases) is the visual viewport. See more about this hereenglish.
This is the browser area where your site or application appears. CSS offers units of measurement proportional to the size of that area.
– bfavaretto
https://answall.com/questions/51244/media-query-não-funciona-em-site-não-responsivo/51248#51248
– hugocsl