我正在使用 Divi构建此网站https://whitesprucepartners.com/ 。当我在移动浏览器上检查元素时,我的锚链接目前工作得很好。但是,当在桌面视图上浏览网站时,链接会“弹回”到页面顶部。
<div id="page-container" class="et-animated-content" style="padding-top: 80px; overflow-y: hidden; margin-top: -1px;">
<header id="main-header" data-height-onload="80" style="top: 32px;" data-height-loaded="true" data-fixed-height-onload="80" class="">
<div class="container clearfix et_menu_container">
<div class="logo_container">
<span class="logo_helper"></span>
<a href="https://whitesprucepartners.com/">
<img src="https://whitesprucepartners.com/wp-content/themes/Divi/images/logo.png" alt="My WordPress" id="logo" data-height-percentage="54" data-actual-width="93" data-actual-height="43">
</a>
</div>
<div id="et-top-navigation" data-height="66" data-fixed-height="40" style="padding-left: 30px;">
<nav id="top-menu-nav">
<ul id="top-menu" class="nav">
<li id="menu-item-218240" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-17 current_page_item menu-item-218240">
<a href="https://whitesprucepartners.com/" aria-current="page">Home</a>
</li>
<li id="menu-item-218241" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-218241">
<a href="#mission" data-et-has-event-already="true">Philosophy</a>
</li>
<li id="menu-item-218242" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-218242">
<a href="#Team" data-et-has-event-already="true">Team</a>
</li>
<li id="menu-item-218243" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-218243">
<a href="https://whitesprucepartners.com/#Portfolio" aria-current="page" data-et-has-event-already="true">Portfolio</a>
</li>
<li id="menu-item-218245" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-218245">
<a href="https://whitesprucepartners.com/#contact" aria-current="page" data-et-has-event-already="true">Contact</a>
</li>
</ul>
</nav>
<div id="et_top_search">
<span id="et_search_icon"></span>
</div>
<div id="et_mobile_nav_menu">
<div class="mobile_nav closed">
<span class="select_page">Select Page</span>
<span class="mobile_menu_bar mobile_menu_bar_toggle"></span>
<ul id="mobile_menu" class="et_mobile_menu">
<li id="menu-item-218240" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-17 current_page_item menu-item-218240 et_first_mobile_item">
<a href="https://whitesprucepartners.com/" aria-current="page">Home</a>
</li>
<li id="menu-item-218241" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-218241">
<a href="#mission" data-et-has-event-already="true">Philosophy</a>
</li>
<li id="menu-item-218242" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-218242">
<a href="#Team" data-et-has-event-already="true">Team</a>
</li>
<li id="menu-item-218243" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-218243">
<a href="https://whitesprucepartners.com/#Portfolio" aria-current="page" data-et-has-event-already="true">Portfolio</a>
</li>
<li id="menu-item-218245" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-218245">
<a href="https://whitesprucepartners.com/#contact" aria-current="page" data-et-has-event-already="true">Contact</a>
</li>
</ul>
</div>