窗口最小化时保留 HTML 页面的位置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4836909/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Preserve positioning of HTML page when window minimized
提问by rajprashanth r
I have a problem with my page.
Whenever I minimize the window the positioning of all the elements goes off and things get distorted.
我的页面有问题。
每当我最小化窗口时,所有元素的定位都会消失并且事情变得扭曲。
回答by Arseny
If the elements go off their position when you make your browser window too small, use the CSS min-width property. It makes the web browser show the scroll bar instead of trying to shrink the web page.
如果在您将浏览器窗口设置得太小时元素偏离了它们的位置,请使用CSS min-width 属性。它使 Web 浏览器显示滚动条,而不是尝试缩小网页。
Like this:
像这样:
body {
min-width: 700px;
}