Style of scroll bar in HTML

Source: Internet
Author: User
Tags border color

div scroll bar settings (CSS) 2008/09/26 control of the scroll bar in 03:07div January 06, 2008 Sunday 01:181) Hide scroll bar
<body style= "Overflow-x:hidden;overflow-y:hidden" >
(2) How to show scroll bars in a cell or layer
<div style= "Width:200px;height:200px;overflow-x:auto;overflow-y:auto;" ></div>
(3) JavaScript changes the style of the scroll bar in the frame, such as changing the color, change to the plane effect, etc.
<STYLE>
BODY {scrollbar-face-color: #ffcc99;
Scrollbar-highlight-color: #ff0000;
Scrollbar-shadow-color: #ffffff;
Scrollbar-3dlight-color: #000000;
Scrollbar-arrow-color: #ff0000;
Scrollbar-track-color: #dee0ed;
Scrollbar-darkshadow-color: #ffff00;}
</STYLE>

Description
Scrollbar-3dlight-color:color; Sets or retrieves the scroll bar light border color;
Scrollbar-highlight-color:color; Sets or retrieves the bright edge color of the 3D interface of the scroll bar;
Scrollbar-face-color:color; Sets or retrieves the color of the 3D surface of the scroll bar;
Scrollbar-arrow-color:color; Sets or retrieves the color of the scroll bar direction arrows; This property fails when the scrollbar appears but is not available;
Scrollbar-shadow-color:color; Sets or retrieves the dark side color of the scroll bar 3D interface;
Scrollbar-darkshadow-color:color; Sets or retrieves the color of the scroll bar's dark border;
Scrollbar-base-color:color; Sets or retrieves the scroll bar datum color. Other interface colors will be adjusted on their own initiative.
Scrollbar-track-color:color; Set or retrieve the drag area color of a scroll bar
Note:
color code you want to set, can be 16 binary, such as #ff0000, can be expressed in RGB, for example, RGB (255,0,255), when you set the scroll bar style, you do not have to use all the properties to take effect.
(4) page element positioning in JavaScript
ClientX, ClientY is the current position of the mouse relative to the page, when the mouse is located in the upper left corner of the page clientx=0, clienty=0;
OffsetX, OffsetY is the current position of the mouse relative to an area of the page, when the mouse is located in the upper-left corner of this area of the page offsetx=0, offsety=0;
ScreenX, Screeny is the position of the mouse relative to the user's entire screen;
X, y is the current position of the mouse relative to the current browser
ScrollLeft: Sets or gets the distance between the left edge of the object and the leftmost part of the current visible content in the form (due to the creation of a scrollbar, the page's visible content is now indeterminate).
ScrollTop: Sets or gets the distance between the top of the object and the top of the visible content on the form.
Left: The x-coordinate of the object relative to the page.
Top: The y-coordinate of the object relative to the page
(4) Shielding selection, right button, etc.
<body Oncontextmenu=self.event.returnvalue=false onselectstart= "return false" >


Style of scroll bar in HTML

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.