gpt4 book ai didi

css - 当浏览器尺寸减小时,图像和 div 部分被截断

转载 作者:行者123 更新时间:2023-11-28 18:15:35 25 4
gpt4 key购买 nike

在我正在构建的网站上,在我减小浏览器的大小后,标题图像和 div 部分被截断:enter image description here

我已经尝试使用 Firebug 跟踪代码,但我真的无法弄清楚我做错了什么。有什么想法吗?

CSS:

.slide {
padding-top: 125px;
background-attachment: fixed;
width: 100%;
height: 100%;
min-height: 960px;
position: relative;
box-shadow:inset 0px 10px 10px -10px rgba(0,0,0,0.3);
}
div#home, div#contact {
min-height: 480px;
}
div#inner-container {
text-align: left;
width: 960px;
margin: 0 auto;
padding: 0;
white-space: normal;
position: relative;
height: 100%;
}
div#greenPortion {
background-color: #3CA67B;
min-width: 100%;
height: 200px;
bottom: 0;
position: absolute;
}
div#title {
background-image:url(../images/banner.png);
margin: 0 auto;
padding: 0;
min-width: 100%;
height: 200px;
}

HTML:

<div class="slide" id="home" data-slide="1" data-stellar-background-ratio="1">
<div id="inner-container">
<div id="name" clas="row">
<img src="images/names.png">
</div>
</div>
<div id="greenPortion"></div>
</div>

网站:http://andrewgu12.kodingen.com/

任何帮助将不胜感激,谢谢!

最佳答案

在 css 中将 min-width: 960px 应用于您的 body:

CSS

body {
...
min-width: 960px;
...
}

关于css - 当浏览器尺寸减小时,图像和 div 部分被截断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17959210/

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