我有箭头向下点击跳转到特定的部分页面,点击滚动功能是有效的,但我需要当点击图标,然后跳到一个特定的箭头向下图标将隐藏。
.scroll-regform, .mobile {
display: block!important;
}
.scroll-regform {
position: fixed;
right: 44%;
top: 200px;
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 50%;
z-index: 3;
line-height: 30px;
text-align: center;
color: #fff;
font-size: 28px;
} <a href="#scroll-regform" href="#" class="scroll-regform"><i class="fa fa-angle-down animated-menu bounce" aria-hidden="true" alt="download" class="pt-8"></i></a>
<div class="col-md-7" id="scroll-regform">
<p>content</p>
</div>
发布于 2021-12-10 09:16:18
$( ".scroll-regform" ).click(function() {
$(this).addClass('hideIcon')
});.scroll-regform, .mobile {
display: block!important;
}
.scroll-regform {
right: 44%;
top: 200px;
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 50%;
z-index: 3;
line-height: 30px;
text-align: center;
font-size: 28px;
}
.scroll-regform.hideIcon{
display: none !important;
}<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<a href="#scroll-regform" href="#" class="scroll-regform"><i class="fa fa-angle-down animated-menu bounce" aria-hidden="true" alt="download" class="pt-8">ICON</i></a>
<div class="col-md-7" id="scroll-regform">
<p>content</p>
</div>
https://stackoverflow.com/questions/70301887
复制相似问题