javascript-Picture Horizontal Seamless scrolling (can be run on the server)

Source: Internet
Author: User

The first two "picture horizontal scrolling" javascript, in the local run is very beautiful, but a back to our school backstage server, there are a lot of problems, this is OK.

CSS code:

1 <style type= "Text/css" >2 . Scroll_div{3 width:1000px;4 Height:250px;5 margin:0 Auto;6 Overflow:Hidden;7 White-space:nowrap;8 background:#ffffff;9}Ten  One . Scroll_div img{ A width:250px; - Height:250px; - Border:0; the Border:1px #efefef Solid; -} -  - #scroll_begin, #scroll_end, #scroll_begin ul, #scroll_end ul, #scroll_begin ul Li, #scroll_end ul Li{ + Display:inline; -}
View Code

JavaScript code:

1<script language= "JavaScript" >2         functionScroll_img_left () {3             varSpeed = 204             varScroll_begin = document.getElementById ("Scroll_begin");5             varScroll_end = document.getElementById ("Scroll_end");6             varScroll_div = document.getElementById ("Scroll_div");7scroll_end.innerhtml =scroll_begin.innerhtml8             functionMarquee () {9                 if(Scroll_end.offsetwidth-scroll_div.scrollleft <= 0)TenScroll_div.scrollleft-=Scroll_begin.offsetwidth One                 Else Ascroll_div.scrollleft++ -             } -  the             varMyMar =setinterval (Marquee, speed) -Scroll_div.onmouseover =function () { - clearinterval (MyMar) -             } +Scroll_div.onmouseout =function () { -MyMar =setinterval (Marquee, speed) +             } A         } at</script>
View Code

HTML code:

<div class= "" >        <div id= "Scroll_div" class= "Scroll_div" >            <div id= "Scroll_begin" >                < ul>                    <li><a href= "" ></a></li>                    <li><a Href= "" ></a></li> <li><a                    href= "></a></li>                    <li><a href=" "></a ></li>                </ul>            </div>            <div id= "scroll_end" ></div>        </div>    </div>

Full HTML page code:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.D TD ">

javascript-Picture Horizontal Seamless scrolling (can be run on the server)

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.