"I would like to implement a menu that remains in a fixed position on the page even if I scroll, such as ""sponsor link"" at the bottom of the right menu of the site below."
http://www.akb48matomemory.com/archives/1017688632.html
However, I would like to do the following, but would it be possible to implement it like this?
Let me borrow your wisdom.
Thank you for your cooperation.
After comparing the current sscrollTop と with the previous sscrollTop を in the callback of the onscroll event and finding the direction, you can do it with the CSS position: fixed and top:0 or bottom:0
You can calculate "scrollTop" in any browser as shown below.
window.pageYOffset||( document.documentElement& document.documentElement.scrollTop)|| document.body.scrollTop
© 2024 OneMinuteCode. All rights reserved.