简体   繁体   中英

Minimum Viewport Width in Chrome

How do I set the minimum viewport width in Chrome?

I put this in the head of the document:

<meta name="viewport" content="width=device-width, initial-scale=1">

And this for 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. The body is the same width as the browser window but has a min-width of 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> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM