This article examples for you to share the seamless scrolling effect of JavaScript code implementation, for your reference, the specific content as follows "
Effect Chart:
Implementation code:
Please refer to the following topics for your study:
"JavaScript Scrolling effect Summary" jquery scrolling effect Summary "JavaScript picture Carousel Effect Summary"
The above is the entire content of this article, I hope to learn JavaScript pro
to the initial left:0;
if (OUL.OFFSETLEFT
Code on:
Html:
Css:
* {margin:0;padding:0;}
#box {width:480px; height:110px; border:1px red solid; margin:100px auto;overflow:hidden; position:relative;}
#box ul{position:absolute; left:0; top:5px;}
#box ul Li{list-style:none; float:left; width:100px; height:100px; padding-left:16px;}
Js:
The above is a small set for everyone to share based on the JS seamless
Picture horizontal seamless scrolling effect in a large number of Web sites have applications, especially when some corporate web site in the display of products, because it is dynamic effect, so can give the site a lot of color, compared to static picture display can attract users ' attention, the following example code to introduce how to achieve this effect. The code is as follows:
The wants to help you learn about JavaScript programmi
jquery enables simple, seamless scrolling
Scroll () Usage:
function Scroll () {
$ (". Content ul"). Animate ({"Margin-left": " -110px"},function () {
//This is let the whole UL slide forward first Li, If you want to slide 5 at a one-time, then 550px.
To scroll up, change to $ (". Content ul"). Animate ({"Margin-top": " -105px"}
///want to scroll down to $ (". Content ul"). Animate ({"Margin-top": "105px"}
//Want to scrol
in order to teach the need, sorted out the JS picture seamless scrolling code.
has always been copied online classic JS scrolling code, a slight change to become their own, is to explain, JS is how to let the pictures move up.
The following is the online source code, Baidu a lot of this kind, if you are to solve the actual effect of the display, please copy, do not need to look backwards.
1, how to let the picture move up.
solve the problem of mo
This example describes the jquery simulation marquee to achieve seamless scrolling effect. Share to everyone for your reference, specific as follows:
More interested readers of jquery-related content can view the site topics: "jquery window Operation tips Summary", "jquery drag and drop effects and tips summary", "jquery common Plug-ins and Usage summary", "jquery Ajax Usage Summary", "jquery Table" ( Table) Summary of operations tips, jquer
The earliest use of the queue to hold data, the time node for a one-time read and FTP transmission, but the queue data is too slow, so reuse the memory stream to solve the performance of the data, on the other hand, the data for seamless FTP upload.
1, first set up a memory stream MemoryStream, and build its StreamWriter
MemoryStream data_stream = new MemoryStream ();
StreamWriter data_writer = new StreamWriter (Data_stream);
2, a locked memory str
Original works, allow reprint, reprint, please be sure to hyperlink form to indicate the original source of the article, the author's information and I declare. Otherwise, legal liability will be held.
Author: Eternal の_☆ Address: http://blog.csdn.net/chenghui0317/article/details/8170001
Text list Seamless scroll up code:
The text list seamlessly scrolls the code horizontally:
jquery Text Seamless scrolling plug-in, only suitable for text, because this effect is to use the first row inserted into the last to achieve, if the larger content block, will compare cards.
The source code is as follows:
The code is as follows
Copy Code
(function ($) {$.fn.myscroll = function (options) { Default configurationvar defaults = {speed:40,//scrolling speed, the greater the value the slower the speedROWHEIGH
Core jquery Code:
Copy Code code as follows:
$ (function () {
var _wrap=$ (' Ul.line ');//define scrolling area
var _interval=2000;//defines the scrolling gap time
The Var _moving;//need to erase the animation
_wrap.hover (function () {
Clearinterval (_moving)//When the mouse is in the scrolling area, stop scrolling
},function () {
_moving=setinterval (function () {
var _field=_wrap.find (' Li:first ');//This variable cannot be placed at the beginning of the funct
Copy Code code as follows:
Scroll.js:
Copy Code code as follows:
/**********
Function: To achieve horizontal or vertical seamless scrolling
Parameters: Direction direction, total 4 values: Left,right,top,bottom
Speed moving distance
Itime how much time to start moving, if not write the page after loading start to move
**********/
function Scroll (direction,speed,itime) {
var odiv = document.getElementById (' scroll ')
Ideas:
A group of pictures controls its scroll bar to scroll and then copies the group of pictures and adds them to the original picture group, and now has two sets of pictures. As you can imagine, now that the scroll bar continues to scroll, the last picture of that group of pictures has been rolled to the top and disappeared, and the first copy of the picture appears after the last picture in the original image, and you can feel the seamless scroll
JS seamless scrolling effect on almost any web page can see its figure, and some may be using plug-ins, in fact, using the original JavaScript relatively simple.
The main is the use of JS location knowledge.
1.innerHTML: Sets or gets the HTML tag of the element
2.scrollLeft: Sets or gets the left distance between the left edge of the object and the current visible content in the window
3.offsetWidth: Sets or gets the width of the specified label
In the Classic Forum (HTTP://WWW.BLUEIDEA.COM/BBS) to see a use of seamless background image produced by the effect, feel very good, special extracts this tutorial, convenient reference.
1, create a new long and wide 20 pixel background for transparent files. Zoom to 800 times times
2, using a line tool to draw a 20 pixel length. A line that is 1 pixels wide. Arrange them like diagrams. (for easy to see, I set the fill color to black)
3, select al
The IT industry is already in the cloud, and more and more enterprise IT infrastructures will be deployed in public, private, or mixed clouds, and it will be important for the database to be the most important part of the IT infrastructure to be integrated into the cloud. SQL Server 2014 opens up the relationship between the public cloud and the organization, whether it is running inside the enterprise or running on a Microsoft Azure virtual machine, SQL Server 2014 directly supports the deploym
Website: Online store imitates the real shop
Shoeguru's online shoe store feels so real that you can almost smell the leather! Simple, on the wall display design gives a very real experience, for a sales of footwear products site, is simply the perfect design.
Dual-use mailing ads: the seamless combination of business cards and advertising
Attach a business card to your direct mail advertisement is not nothing new, but these cards are often san
Js achieves seamless rolling and compatible with IEFF. You can take a look. Principle Analysis:
1. First, set the height or width for the container, such as ul, and set ul height to 40px; overflow: hidden;
2. After the height of the container is set, the content height exceeds 40px, and more than half of the content overflows and is hidden. The scrollTop attribute is available. You can use overflow: scroll to view the effect;
3. Change the value of th
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.