Custom scroll bar 3.0_javascript tips
Release: 2016-05-16 18:50:00
Original
926 people have browsed it
-
Supports beautification extensions in any form (including image customization), cross-browser support
-
Support mouse to hold down the up and down arrow buttons to scroll up and down
-
Supports scrolling by placing the mouse wheel in the "scroll bar area", not only in the scrolling content area
-
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
-
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
-
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)
-
Supports up and down arrow keys on the keyboard. After the scroll area is scrolled, it is the page body's turn to scroll
-
Supports retaining the scroll bar scroll position after page refresh (requires browser support or turning on cookies)
-
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
-
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
- 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:
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
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31