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?
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.