Javascript:google Scroll up effects, compatible ie6,7,8,ff_javascript tips

Source: Internet
Author: User
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; Charset=utf-8 "/> <title>2010 the latest fully compatible ie6,ie7,ie8,ff CSS hack notation </title> <style type=" Text/css "> # google1 {border:none; width:270px; height:20px; margin:0px 0; font-size:12px; padding-left:0px; Overflow:hidden; font-family:arial; } #google1 ul {margin:0px; padding:0px; List-style-type:none; } #google1 li {line-height:20px; } </style> </pead> <body> <div id= "Google1" > <ul id= "dhooo1" > <li> samsara. To fix it. Myth and Creativity new book Qishan the first public </li> <li> West War record 1080P HD screen enjoy </li> <li> before the test must read the "West Travel War Remember" novice issue of the </li> <li> vomiting drugs recommended A survey of the 36 highlights of the Western Tour war </li> <li>1 pre-test must read "West Tour war Record" Novice problem collection </li> <li>2 before the test will read the "West Tour War" Novice Problem collection </li> </ul > </div> &LT;SCRIPT type= "Text/javascript" > Xs=function (a,b,c,d,e,f) {var $=function (id) {return document.getElementById (ID)},Y=+ !! F (a=$ (A)). AppendChild ((b=$ (B)). CloneNode (true)); (function () {var m=a.scrolltop%c? e| | 0):D; A.scrolltop=[0,b.offsetheight][y]==a.scrolltop? [b.offsetheight-1,1] [Y]:(a.scrolltop+[-1,1][y]); SetTimeout (ARGUMENTS.CALLEE,M); }) () return Arguments.callee; } xS (' Google1 ', ' dhooo1 ', 20,3000,10,1); </script> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

This code is I brought online to find, because today again use, so record down, so as not to be found later, I now want to search its description documents are not found!

The code is very concise, and browser compatibility is excellent, the only problem is that if you want to scroll a number of words will be a problem! So you need to adjust the parameters C and the height inside the style

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.