Why is this JS for horizontal scrolling images only valid in IE and not in CHROME?_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:14:17
Original
932 people have browsed it

Please tell me how to modify it.


Currently it only works in IE. When it comes to 360 and other browsers, there is a large strip of pictures horizontally, and the page is messed up and does not scroll.



<script>var speed=30demo2.innerHTML=demo1.innerHTMLfunction Marquee(){if(demo2.offsetWidth-demo.scrollLeft<=0)demo.scrollLeft-=demo1.offsetWidthelse{demo.scrollLeft++}}var MyMar=setInterval(Marquee,speed)demo.onmouseover=function() {clearInterval(MyMar)}demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} </script>
Copy after login


Reply to discussion (solution)

It is recommended that you use this JS scrolling class.

http://www.popub.net/

It is recommended that you use this JS scrolling class.

http://www.popub.net/

I don’t understand this.

Is it easy to edit the one I posted?

Please help

Your approach has no compatibility and will of course fail in some browsers.

Take a closer look at the MSClass I posted. If there are examples, just copy them.

If you can’t use the DEMO, it only means that your foundation is too poor.

Your approach without any compatibility will of course fail in some browsers.

Take a closer look at the MSClass I posted. If there are examples, just copy them.

If there is a DEMO and you still can’t use it, it only means that your foundation is too poor.

Thank you for your answer.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!