Html 为什么我的锚标签不';我们不能移动到div目标吗?
我在我的公文包网站上遇到了一个问题,关于我在箭头图标上设置的锚定标签。我在启动屏幕上设置的第一个箭头似乎移动到了下一部分。我设置的其他两个箭头不会移动到页面上的下一节/div。我不确定是什么原因导致了这种情况,因为我已经为我将在第二个和第三个按钮的锚定标记中引用的div设置了id 箭头2Html 为什么我的锚标签不';我们不能移动到div目标吗?,html,css,Html,Css,我在我的公文包网站上遇到了一个问题,关于我在箭头图标上设置的锚定标签。我在启动屏幕上设置的第一个箭头似乎移动到了下一部分。我设置的其他两个箭头不会移动到页面上的下一节/div。我不确定是什么原因导致了这种情况,因为我已经为我将在第二个和第三个按钮的锚定标记中引用的div设置了id 箭头2 <div id="snap" class="bounce arrow"> <a href="#featproject"> <
<div id="snap" class="bounce arrow">
<a href="#featproject">
<i class="fa fa-chevron-circle-down fa-5x" aria-hidden="true"></i>
</a>
</div>
<!-- Carousel of Projects -->
<div class="row featuredprojects" id="featproject">
<div class="col-md-12">
<h2><u>Featured Projects</u></h2>
</div>
</div>
注意:对不起,这是我第一次在StackOverflow上发帖。我编辑了代码中不需要的注释。我在我的代码中重构了启动屏幕,我把它放在一个标题标记中,并注意到当这些按钮断开时。我已经在下面包括了我的GitHub
GitHub:通过删除x-overflow和y-overflow的html、正文和正文样式属性来解决。执行此操作后,锚定标记按钮将移动到下一个具有特定id的div。在我解决此问题时忘记添加答案。我会在可能的时候制作一个关于这个问题的视频。
<div id="snap" class="bounce arrow">
<a href="#contact">
<i class="fa fa-chevron-circle-down fa-5x" aria-hidden="true"></i>
</a>
</div>
<div class="contact" id="contact">
<button id="contact_button" class="unstyled-button contact-button" data-modal-type="modal-8" >Contact</button>
</div>
* {
box-sizing: border-box;
padding: 0;
margin: 0;
border: 0;
}
html,body
{
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow-x: hidden;
}
body {
background-color: #fafaf6; /* #fafaf6 */
color: black;
overflow-y: scroll;
scroll-behavior: smooth;
}
header {
height: 100vh;
margin-bottom: 10px;
background: url("../img/splashscreen.jpg") no-repeat center center;
background-size: cover;
display: flex;
flex-direction: column;
}
.header-container{
padding-right: 110px;
padding-left: 220px;
color: #40E0D0;
}
.arrow{
text-align: center;
margin-bottom: 20px;
}
.bio{
font-size: 15px;
text-align: center;
}
.bio-section{
height: 100vh;
}
.featuredprojects{
background-image: url("../img/coding.jpg");
height: 100vh;
color: #40E0D0;
}
.contact{
text-align: center;
padding-top: 300px;
height: 100vh;
background-color: #40E0D0;
}