gpt4 book ai didi

html - Css 100 视口(viewport)宽度大于屏幕宽度?

转载 作者:行者123 更新时间:2023-11-28 15:10:40 24 4
gpt4 key购买 nike

enter image description here

问题是关于我的部分比标题部分稍宽,即使它们的宽度相同。您甚至可以在图片中观察到这一点。蓝色背景是在控制台中检查的标题部分,白色区域是关于我的部分这也显示了底部的侧边导航栏,这有些麻烦。

 <!--Header Section   -->
<section id="header">
<div class="header-bg-overlay">
<div class="header-bg">
<div class="container">
<div class="hero-content">
</div>
</div>
</div>
</div>
</section>

<section id="about-me">
<div class="about-section">

</div>
</section>

CSS

h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Montserrat', sans-serif;
}

h5{
color:white;
font-size:75px;
font-weight: bold;
}
h4{
color:white;
font-size:55px;
font-weight: bold;
}
body{
font-family: 'Roboto', sans-serif;
margin:0;
padding: 0;
}
.header-bg{
width:100vw;
height: 100vh;
background-color: black;
background: url('../assets/background.jpg')no-repeat center;
background-position: -30px -80px;
}

#about-me{
width:100vw;
height: 100vh;
background-color: #FFFFFF;
box-sizing: border-box;
}

最佳答案

尝试将两个部分的宽度都更改为 100%

关于html - Css 100 视口(viewport)宽度大于屏幕宽度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48487432/

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