Move the code around the picture written by yourself

Source: Internet
Author: User
<Body bgcolor = "#669900" onLoad = "A ()"> <Div id = "all" style = "width: 500px; Height: 245px; margin: 0 auto; overflow: hidden; Border: 1px #999999 solid; "> <Div id =" show1 "style =" width: 2000px; Height: 245px; float: Left; Border: 1px #000000 solid; ">           </div> <SCRIPT type =" text/JavaScript "> vaR Al = document. getelementbyid ('all'); var X; function a () {If (Al. scrollleft> = 1500) {Al. scrollleft --; X = 2;} else if (Al. scrollleft <= 500) {Al. scrollleft ++; X = 1 ;}else {If (x = 1) Al. scrollleft ++; elseal. scrollleft --;} var T = setTimeout ('a () ', 10) ;}</SCRIPT> </body>

CodeThe implementation mainly lies in

 
Overflow: hidden;

And

 
Al. scrolllef

Attribute

How to handle hidden content

It can achieve better results!

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.