gpt4 book ai didi

javascript - 当 div 可见时更改元素 CSS

转载 作者:太空宇宙 更新时间:2023-11-04 14:00:54 25 4
gpt4 key购买 nike

<分区>

如何在到达某个div时去掉一行CSS代码?

请注意:

  • 我需要包含这行代码的 CSS 类
  • div 是通过点击页眉中的链接到达的,所以我认为 mouseenter() 事件是不够的。

我的代码:

$(document).ready(function(){
//firing the event to change CSS when reaching #resume

$('#resume').mouseenter(function() {
$('#resume').class('education').css('border-bottom','');
});
});
.education, .work {
margin-bottom: 48px;
padding-bottom: 24px;
//border-bottom: 1px solid #E8E8E8;
}
   <section id="resume">
<!-- Education -->
<div class="row education">

<div class="three columns header-col">
<h1><span>Education</span></h1>
</div>


<div class="education work">
</div> <!-- main-col end -->

</div> <!-- End Education -->

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