[英]Flixable Div Height and Width
我有一个div
,我希望它是全屏幕,当我最小化时我需要自动显示div
的滚动,并且身体概述将始终隐藏,所以我需要的是在高屏幕分辨率上使这个div
全屏低分辨率div
的滚动而不是身体显示( overflow-x
和overflow-y
)
All you are talking about is responsive web design. 你所谈论的只是响应式网页设计。
For the below HTML division: 对于以下HTML部门:
<div id="container">
<!-- contents goes here -->
</div>
Using media queries, you can do this easily. 使用媒体查询,您可以轻松完成此操作。 First add the below line to your head:
首先将以下行添加到您的头部:
<meta name="viewport" content="width=device-width; initial-scale=1.0">
For high resolution add the below code to css: 对于高分辨率,将以下代码添加到css:
@media screen and (max-width: 1280px) {
#container {
width: 1200px;
}
}
Then for low resolution add the below code to css: 然后为低分辨率将以下代码添加到css:
@media screen and (max-width: 800px) {
#container {
width: 750px;
}
}
Responsive Web Design Guidelines and Tutorials 响应式网页设计指南和教程
Hope this will helps you. 希望这会对你有所帮助。
Cheers!!! 干杯!!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.