[英]Minimum Viewport Width in Chrome
How do I set the minimum viewport width in Chrome? 如何在Chrome中设置最小视口宽度?
I put this in the head of the document: 我将其放在文档的开头:
<meta name="viewport" content="width=device-width, initial-scale=1">
And this for CSS: 这对于CSS:
@viewport {
min-width: 700px;
}
This is a little different, but I think it might have the same effect you are trying to achieve. 这有些不同,但是我认为它可能会达到您想要达到的效果。 Try viewing the code below in
Full Page
and resizing your browser. 尝试在“整
Full Page
查看下面的代码并调整浏览器的大小。 The body is the same width as the browser window but has a min-width
of 700px
. 主体与浏览器窗口的宽度相同,但
min-width
为700px
。
html, body { padding: 0; margin: 0; width: 100%; min-width: 700px; height: 100%; } .box { display: inline-block; height: 100px; width: 100%; background-color: #000; }
<div class="box"></div> <h1>Some Text</h1>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.