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

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

WBOY
WBOYOriginal
2016-06-24 12:29:291024browse

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)

Statement:
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