Home > Web Front-end > JS Tutorial > body text

Custom scroll bar 3.0_javascript tips

WBOY
Release: 2016-05-16 18:50:00
Original
889 people have browsed it
  1. Supports beautification extensions in any form (including image customization), cross-browser support
  2. Support mouse to hold down the up and down arrow buttons to scroll up and down
  3. Supports scrolling by placing the mouse wheel in the "scroll bar area", not only in the scrolling content area
  4. Supports the mouse to hold down the scroll bar (without releasing it) and move it out of the scroll area to still drag and scroll
  5. The scroll bar is proportional to the height of the scrolling content on the left and the height of the visible area. When the scroll bar is thin to a certain extent, the minimum height value is set. When the content is too small, the scroll bar is hidden
  6. Supports mouse click on the upper and lower blank areas of the scroll bar to achieve up and down positioning scrolling (simulating windows scroll bars)
  7. Supports up and down arrow keys on the keyboard. After the scroll area is scrolled, it is the page body's turn to scroll
  8. Supports retaining the scroll bar scroll position after page refresh (requires browser support or turning on cookies)
  9. Place the mouse in the custom scroll area and scroll the wheel. After the scroll area is scrolled, it is the page body's turn to scroll
  10. The code is refactored based on the previous versions. This time, you only need to add a class named "dumascroll" to the rendered div to automatically render. Those without this class will not be affected
  11. Fixed bugs found in previous versions: Previous versions
Future versions can continue to expand The functions are :
1,
Add support for "downward" fast scrolling of the space bar (to better simulate the windows scroll bar user experience)
2, Add rendering support for page body
3. Add rendering support for textarea
4. Add rendering support for nested divs (there is currently a scrolling bug when the code is nested) , the scroll height algorithm of nested divs will be significantly modified in this version)
5. Add support for simultaneous horizontal scroll bars (can be expanded when there is a need for this)

Demonstration:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!