Infinite scrolling horizontal text
How do I make an infinite scrolling horizontal text?
Http://greensock.com/forums/topic/10230-what-is-the-best-method-for-scrolling-text-horizontally-across-a-div/. What is a infinite scrolling horizontal text? How do you make a infinite scrolling horizontal text? This script and codes were developed by Chrysto on 16 July 2022, Saturday.
Infinite scrolling horizontal text - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Infinite scrolling horizontal text</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <button id="ov">Overflow Visible</button> <button id="oh">Overflow Hidden</button> <div class="holder"> <ul class="list"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Infinite scrolling horizontal text - Script Codes CSS Codes
body,div,ul,li,p { margin:0; padding:0;
}
/* CUSTOM STYLES
*/
.holder { position:relative; top:100px; left:100px; width:200px; height:150px; background-color:red; overflow:visible;
}
.holder.hide-overflow { overflow:hidden;
}
ul.list { position:relative; display:inline-block; background-color:#000; list-style:none;
}
ul.list.cloned { position:absolute; top:0; left:0; background-color:lime!important;
}
ul.list li { background-color:blue; float:left; width:200px; height:150px; text-align:center; font-size:30px;
}
Infinite scrolling horizontal text - Script Codes JS Codes
var $holder = $(".holder");
var $list = $holder.find("ul.list");
var $clonedList = $list.clone();
var listWidth = $list.find("li").length * 200;
var endPos = $holder.width() - listWidth;
$list.add($clonedList).css({ "width" : listWidth + "px"
});
$clonedList.addClass("cloned").appendTo($holder);
//TimelineMax
var infinite = new TimelineMax({repeat: -1, paused: false});
var time = 5;
infinite.fromTo($list, time, {left:0}, {left: -listWidth, ease: Linear.easeNone}, 0);
infinite.fromTo($clonedList, time, {left:listWidth}, {left:0, ease: Linear.easeNone}, 0);
infinite.set($list, {left: listWidth});
infinite.to($clonedList, time, {left: -listWidth, ease: Linear.easeNone}, time);
infinite.to($list, time, {left: 0, ease: Linear.easeNone}, time);
//Pause/Play
$holder.on("mouseenter", function(){ infinite.pause();
}).on("mouseleave", function(){ infinite.play();
});
//Show/Hide overflow
$("#ov").on("click", function(){ $holder.removeClass("hide-overflow");
});
$("#oh").on("click", function(){ $holder.addClass("hide-overflow");
});
Developer | Chrysto |
Username | bassta |
Uploaded | July 16, 2022 |
Rating | 3 |
Size | 2,438 Kb |
Views | 48,576 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Fullscreen image in Canvas | 2,268 Kb |
Footer concept | 2,210 Kb |
Simple GSAP Slider | 2,839 Kb |
Simple one page header concept | 2,530 Kb |
Smooth scroll | 4,915 Kb |
One page website scrolling effect | 2,764 Kb |
Medium.com style header effect | 2,828 Kb |
GIF-like animation with single image | 1,807 Kb |
TweenLite staggerTo | 2,495 Kb |
Fullscreen Parallax | 3,313 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSS Social Media Icon | TychoBlender | 3,871 Kb |
Fellowship of the Ring | Aussieyang | 2,639 Kb |
Direction-icon | Alexandremasy | 3,323 Kb |
After America | Jonathangarner | 2,686 Kb |
Countdown Timer | Massiebn | 3,001 Kb |
Rows with image hover effect | Amit-webdesigner | 12,875 Kb |
Halo 5 REQ Guide Bookmarklet | Cwacht | 3,993 Kb |
Simple CSS loader. | Cabrera | 2,574 Kb |
Heatmap Color Scales | Stevepepple | 2,331 Kb |
Button shaking | SusanneLundblad | 2,227 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!