Home > Web Front-end > HTML Tutorial > Picture seamless scrolling (div css)_html/css_WEB-ITnose

Picture seamless scrolling (div css)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:29:29
Original
1029 people have browsed it

I believe everyone has noticed that does not scroll in a loop, so there are many alternative scripts, or iframe or JS output . No matter how you do it, it is a little troublesome. Let’s talk about this relatively simple implementation idea: a container demo that sets the width and hides the content beyond its width, and puts demo1 and demo2 inside. demo1 is the scrolling content, and demo2 is a direct clone of demo1. By constantly changing the scrollTop of demo1 or scrollLeft achieves the purpose of scrolling. When scrolling to the junction of demo1 and demo2, it jumps directly back to the initial position. Because demo1 is the same as demo2, the jumping moment cannot be distinguished, thereby achieving the purpose of "seamless" scrolling.
http://hi.baidu.com/cnaspnet/blog/item/52e40c46fcb6af096b63e5bc.html (reprinted from the Internet)

Related labels:
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