P粉9550636622023-08-29 00:22:49
@media(width)< /code>
and @media(height)
a> valueconst vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0) const vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0)
window.innerWidth
a> and window.innerHeight
一个>@media(width)< /code> and @media (height)
which includes scrollbars
initial-scale
and scaling changes may cause movement errors to scale down to a value where the PPK calls the visual viewport and is smaller than @media
valueUndefined in IE8
-document.documentElement .clientWidth
and .clientHeight
@media (width)
and @media (height)
jQuery(window).width()
jQuery Call Browser viewportmatchMedia
to get exact dimensions in any unit