Scroll bar discoloration hidden scroll bar and double click Page Automatic scrolling display code _javascript tips

Source: Internet
Author: User
Install the "scroll bar color" plugin downloaded from the U disk,

After installing to DW, how to apply this special effect plug-in normally?
Answer: Open DW,
1, new page--code--delete all the code before 2, mouse positioning after Scroll bar code English translation: arrow--arrow, track--track.
Tip: If you insert the following code can not change color, please put the page head
scroll bar discoloration:

You can also enter the following code directly between the
Copy Code code as follows:

<style>
Body {scrollbar-face-color: #3333FF;(The color of the protruding part of the stereo scroll bar)
Scrollbar-highlight-color: #505050;(The color of the blank part of the scroll bar)
Scrollbar-shadow-color: #fc2400;(The color of the shadow of the stereo scroll bar)
Scrollbar-arrow-color: #666666;(The color of the triangle arrow on the top and bottom buttons)
Scrollbar-base-color: #333333; (the basic color of the scroll bar)
Scrollbar-dark-shadow-color: #b4fc48} (color of solid scroll bar strong shadow)
</style>

The following 16-bit color values you can change at will, in parentheses is an explanation, please do not insert when you enter.

Hide scroll bars:

In any case, a scroll bar appears if the page is out of display range. But sometimes we don't want it to show, how to hide it? Just insert the code between <body> </body>: <body style= "Overflow-x:hidden;overflow-y:hidden" >. where x represents a horizontal scroll bar, you can hide the vertical scroll bar by changing it to Y.

Double-click the scrolling display of the Web page:

When there is a long article in the Web page, browsing up the more Shang, think about one side busy dragging the scroll bar, while busy browsing, indeed very tiring. For guests to easily browse, we can use the script code to achieve the automatic scrolling screen, when the page is double-clicked, the page will automatically scroll down, click again to stop scrolling. Insert the following code between <body> </body>.
Copy Code code as follows:

<script language "JavaScript" >
var Currentpos,timer;
Function Initialize ()
{
Timer=setinterval ("ScrollWindow ()", 10);
}
function SC () {
Clearinterval (timer);
}
function ScrollWindow ()
{
Currentpos=document.body.scrolltop;
Window.Scroll (0,++currentpos);
if (Currentpos!= document.body.scrollTop)
SC ();
}
Document.onmousedown=sc
Document.ondblclick=initialize
</script>

Note: The above code is non-standard.

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.