Home > Backend Development > PHP Tutorial > javascript - How to implement scrolling with the page when the WordPress side navigation bar is not high enough?

javascript - How to implement scrolling with the page when the WordPress side navigation bar is not high enough?

WBOY
Release: 2016-08-04 09:21:16
Original
1269 people have browsed it

When the height is sufficient, the side navigation is fixed and the content does not scroll with the scroll bar. If the page height is not high enough to display all the navigation bar content, the navigation bar will scroll with the page. How is this effect achieved?

Reply content:

When the height is sufficient, the side navigation is fixed and the content does not scroll with the scroll bar. If the page height is not high enough to display all the navigation bar content, the navigation bar will scroll with the page. How is this effect achieved?

Look at the source code to understand it yourself...
pinMenu function of wp-adminjscommon.js

I have not seen the implementation of wp, but my idea is that the div of the sidebar is wrapped by the entire large container, and then the sidebar is set to relative positioning, and both left and top are 0.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template