Is there a way to restrict the minimum window width to be resized to a width smaller than x
pixels. Can I achive this just using CSS or HTML, eg meta
tags?
I tried setting
body {
min-width: 420px;
}
and this sets a min width for my body. But I can still resize the windows width to smaller than this width value.
You can not control the size of the browser window. You can use CSS to set min-width and min-height properties to ensure your page layout stays same.
You may want to control the size of the browser window which opens when a viewer accesses your web page.(Using javascript)
<body onload="changeScreenSize(500,300)">
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.