are 8 considerations: There is a problem with the computer processing the decimal, so we need to take the decimal, we need to take the rounding up and rounding down *//calculate the speed var = (json[attr]-icur)/8; Speed = speed>0? Math.ceil (Speed): Math.floor (speed); /* Determine if you have reached the end onlyTo have a failure to reach the end of the bstop will be false after the completion of the loop to determine bstop to decide to close the timer */if (Json[attr]!=
This method is very simple, it was written by myself a while ago.
/*
*o just pass to the no-element ID that you want to scroll.
*/
function g(o) {
o. ScrollTop+ =1;
D=o. getElementsByTagName("li") [0]. Offsetheight
Zlm=o. getElementsByTagName("Li");
If(o. ScrollTop>=d) {
o. AppendChild(zlm[0]. CloneNode(true))
o. RemoveChild(zlm[0])
o. ScrollTop=0;
return t=setTimeout("G (b)",+);
}
For(i=0; Izlm. Leng
As follows:The HTML code is as follows:The JS code is as follows: Window.onload = function () {//alert (1)//1, Auto play-left multiple cycles to decrease var olist = this.document.getElementById (' list ') var oBtn01 = document.getElementById (' Btn01 ') var oBtn02 = document.getElementById (' btn02 ') var oslide = Docum Ent.getelementbyid (' slide ') var num = 0//left value var speed =-5 var Otimer = NULL//program copy two parts Olist.inner HTML + = olist.innerhtml//olist.innerhtml = olist.inne
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
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.