When the page scrolls to a div, add a new class to the div through js.Then, when the page scrolls back to the div, remove the class added in the previous step. You can see the middle part of the dynamic graph, and the menu is suspended at the top of the page after scrolling down to a certain position.
On the other hand, when you move the page up to a certain position, the top floating menu will be hidden, and there will be no screenshot.
The css style should be added by yourself.This code is not very neat, and the location seems to be a bit problematic.But it basically realized the function I wanted.So record it for reference.
JQuery implements the effect of rolling to a location to add a class and rolling back to a location to remove a class
113 people have purchased
The download price of this resource isfiveelementBuy Now(VIP free)upgrade now
Professionally provide WordPress theme installation, in-depth localization, accelerated optimization and other website construction services. Please consult online customer service for details!