Compatible with ie6, ie7, and firfox special effects code that are continuously rolled up

Source: Internet
Author: User
Tip: you can modify some code before running

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>Code compatible with text scrolling effects of multiple browsers</title><style type="text/css">. Cls_container {border: 1px solid # ccc; width: 680px; font-size: 12px; height: 24px; overflow: hidden ;}. cls_container ul {list-style-type: none; margin: 0; padding: 0; margin-left: 32px ;}. cls_container ul li {height: 24px; line-height: 24px; width: 320px; float: left; display: inline ;}</style></head><body><div id="myscroll" class="cls_container"><ul><li>Will the monopoly of Microsoft and Google on browsers lead to Web privatization?</li><li>Subversion advanced applications: multiple SVN authentication methods</li><li>Annual Summary: 2008 Java tools</li><li>Do you want to return IT dominance to business personnel?</li><li>Review of IT expert network in: development languages and development platforms</li><li>Next-generation network service integration</li><li>Founder Technology has seven advantages to build full-process professional outsourcing</li><li>08 review: Can Oracle continue to lead the database market?</li><li>Hierarchical relationship analysis of Web security issues</li><li>The ultimate answer from convergence to storage Ethernet</li></ul></div><div id="showhint"></div><script type="text/javascript">Function $ (element) {if (arguments. length> 1) {for (var I = 0, length = arguments. length, elements = []; I<length;i++){elements.push($(arguments[i]));}return elements;}if(typeof element=="string"){return document.getElementById(element);}else{return element;}}var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}Function.prototype.bind=function(object){var method=this;return function(){method.apply(object,arguments);}}var Scroll=Class.create();Scroll.prototype={initialize:function(element,height){this.element=$(element);this.element.innerHTML+=this.element.innerHTML;this.height=height;this.maxHeight=this.element.scrollHeight/2;this.counter=0;this.scroll();this.timer="";this.element.onmouseover=this.stop.bind(this);this.element.onmouseout=function(){this.timer=setTimeout(this.scroll.bind(this),1000);}.bind(this);},scroll:function(){if(this.element.scrollTop<this.maxHeight){this.element.scrollTop++;this.counter++;}else{this.element.scrollTop=0;this.counter=0;}if(this.counter<this.height){this.timer=setTimeout(this.scroll.bind(this),20);}else{this.counter=0;this.timer=setTimeout(this.scroll.bind(this),3000);}},stop:function(){clearTimeout(this.timer);}}var myscroll=new Scroll("myscroll",24);</script></body></html>
Tip: you can modify some code before running

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.