gpt4 book ai didi

css - 所有分辨率的解决方案

转载 作者:行者123 更新时间:2023-11-28 13:47:44 24 4
gpt4 key购买 nike

我的CSS是

@charset "utf-8";
* {
margin: 0;
padding: 0;
}
body {
background-color: #FFFFFF;
}
div#header {
background-color: #969696;
height: 80px;
}
div#mid-bar {
background: url(images/home.jpg) left no-repeat #6f6565;
height: 200px;
padding: 10px 0 10px 0;
}

#searchbox {
float: left;
background-color: #c1c1c1;
height: 200px;
width: 400px;
margin-left: 300px;
}

#multi-ads {
float: left;
background-color: #c1c1c1;
height: 200px;
width: 450px;
margin-left: 10px;
}

我的html是

<body>
<div id="header">

</div>
<div id="mid-bar">
<div id="searchbox">

</div>
<div id="multi-ads">

</div>
</div>
</body>

我目前正在研究 1280 x 800 分辨率。当我更改降级分辨率时,滚动条会激活。我希望我的页面自动适合客户的分辨率。我该怎么办?

最佳答案

  • 使用 % 和/或 em 作为维度
  • 研究 flex/流体布局技术

关于css - 所有分辨率的解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4033161/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com