Beautiful Flat Text Slider
How do I make an beautiful flat text slider?
A fast flat text card slider!. What is a beautiful flat text slider? How do you make a beautiful flat text slider? This script and codes were developed by Daniesy on 10 January 2023, Tuesday.
Beautiful Flat Text Slider - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Beautiful Flat Text Slider</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css'>
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body{ background: url('https://subtlepatterns.com/images/transp_bg.png');
}
h2{ font-weight: 300; font-size: 3vw; padding: 20px 0; } p{ font-size: 1.2vw; line-height: 1.7em; } .slider{ position: relative; width: 100%; overflow: hidden; transition: all .3s; perspective: 900px; transform-style: preserve-3d; } .slider .previous, .slider .next{ font-family: "FontAwesome"; font-size: 20px; position: absolute; top: 50%; color: white; padding: 20px; text-decoration: none; left: -100px; margin-top: -34px; transition: all .3s; opacity: 0; z-index: 10000; } .slider .next{ right: -100px; content: "\f054"; left: auto; } .slider:hover .previous, .slider:hover .next{ opacity: 1; } .slider:hover .previous{ left: 0; } .slider:hover .next{ right: 0; } .slider .slides{ height: 100%; } .slide{ padding: 10%; width: 100vw; text-align: center; position: absolute; transform: scale(0.5,0.5); opacity: 0; transition: all .3s; } .slide.blue{ background: #1E73BE; color: white; } .slide.white{ background: #ccc; color: #444444; } .slide.red{ background: #BF525A; color: white; } .slide.active{ z-index: 10; left: 0; opacity: 1; transform: scale(1,1); } .slide.inactiveLeft{ left: -100vw; z-index: 11; } .slide.inactiveRight{ left: 100vw; z-index: 11; } .slide:after{ content: attr(data-icon); font-family: "FontAwesome"; font-size: 15vw; position: absolute; bottom: -8vw; left: 0; opacity: 0.3; } .slide a{ color: inherit; border: 2px solid; padding: 10px; font-size: 1.3vw; margin-top: 20px; display: inline-block; transition: all .3s; text-transform: uppercase; letter-spacing: 1px; position: relative; } .slide a:hover{ background: rgba(255, 255, 255, 0.2); border: 2px solid transparent; text-decoration: none; letter-spacing: 2px; padding-right: 30px; } .slide a:after{ content: " \f105"; font-family: "FontAwesome"; position: absolute; margin-left: -10px; transition: all .3s; opacity: 0; } .slide a:hover:after{ margin-left: 10px; opacity: 1; } .slider .bullets{ text-align: center; position: absolute; bottom: 10px; width: 100%; } .slider .bullets .bullet{ position: relative; display: inline-block; background: rgba(255,255,255,.8); border-radius: 50%; width: 8px; height: 8px; z-index: 14; margin: 0 5px; cursor: pointer; border: 2px solid transparent; transition: all .3s; } .slider .bullets .bullet.active{ background: rgba(255,255,255,.4); } .slider .bullets .bullet:hover{ border: 2px solid rgba(255,255,255,.8); background: transparent; } </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="slider"> <div class="arrows"> <a class="previous" href="#"></a> <a class="next" href="#"></a> </div> <div class="slides"> <div class="slide active blue" data-icon=""> <h2>Timezones</h2> <p>Clocks+ helps you break the barriers of space and time to get information for any city you like. You can search for and organise your favorite cities so that you can easily find out the correct local time.</p> <a target="_blank" href="https://itunes.apple.com/gb/app/clocks+/id937380413?mt=8">Check me out</a> </div> <div class="slide white" data-icon=""> <h2>Alarms</h2> <p>Nobody wants to miss out on important events, but sometimes, it’s hard to find the time in another city. Clocks+ lets you set alarms for your favorite cities in a simple and intuitive way.</p> <a target="_blank" href="https://itunes.apple.com/gb/app/clocks+/id937380413?mt=8">Start the Clock</a> </div> <div class="slide red" data-icon=""> <h2>Widgets/Today Extension</h2> <p>Clocks+ wouldn’t be a modern app without Widgets. Your favorite cities appear in the Today View with just a swipe down, for quick glancing, Did we mention that they look awesome, too?</p> <a target="_blank" href="https://itunes.apple.com/gb/app/clocks+/id937380413?mt=8">Download on AppStore</a> </div> </div> <div class="bullets"> </div> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Beautiful Flat Text Slider - Script Codes CSS Codes
body{ background: url('https://subtlepatterns.com/images/transp_bg.png');
}
h2{ font-weight: 300; font-size: 3vw; padding: 20px 0; } p{ font-size: 1.2vw; line-height: 1.7em; } .slider{ position: relative; width: 100%; overflow: hidden; transition: all .3s; perspective: 900px; transform-style: preserve-3d; } .slider .previous, .slider .next{ font-family: "FontAwesome"; font-size: 20px; position: absolute; top: 50%; color: white; padding: 20px; text-decoration: none; left: -100px; margin-top: -34px; transition: all .3s; opacity: 0; z-index: 10000; } .slider .next{ right: -100px; content: "\f054"; left: auto; } .slider:hover .previous, .slider:hover .next{ opacity: 1; } .slider:hover .previous{ left: 0; } .slider:hover .next{ right: 0; } .slider .slides{ height: 100%; } .slide{ padding: 10%; width: 100vw; text-align: center; position: absolute; transform: scale(0.5,0.5); opacity: 0; transition: all .3s; } .slide.blue{ background: #1E73BE; color: white; } .slide.white{ background: #ccc; color: #444444; } .slide.red{ background: #BF525A; color: white; } .slide.active{ z-index: 10; left: 0; opacity: 1; transform: scale(1,1); } .slide.inactiveLeft{ left: -100vw; z-index: 11; } .slide.inactiveRight{ left: 100vw; z-index: 11; } .slide:after{ content: attr(data-icon); font-family: "FontAwesome"; font-size: 15vw; position: absolute; bottom: -8vw; left: 0; opacity: 0.3; } .slide a{ color: inherit; border: 2px solid; padding: 10px; font-size: 1.3vw; margin-top: 20px; display: inline-block; transition: all .3s; text-transform: uppercase; letter-spacing: 1px; position: relative; } .slide a:hover{ background: rgba(255, 255, 255, 0.2); border: 2px solid transparent; text-decoration: none; letter-spacing: 2px; padding-right: 30px; } .slide a:after{ content: " \f105"; font-family: "FontAwesome"; position: absolute; margin-left: -10px; transition: all .3s; opacity: 0; } .slide a:hover:after{ margin-left: 10px; opacity: 1; } .slider .bullets{ text-align: center; position: absolute; bottom: 10px; width: 100%; } .slider .bullets .bullet{ position: relative; display: inline-block; background: rgba(255,255,255,.8); border-radius: 50%; width: 8px; height: 8px; z-index: 14; margin: 0 5px; cursor: pointer; border: 2px solid transparent; transition: all .3s; } .slider .bullets .bullet.active{ background: rgba(255,255,255,.4); } .slider .bullets .bullet:hover{ border: 2px solid rgba(255,255,255,.8); background: transparent; }
Beautiful Flat Text Slider - Script Codes JS Codes
var $slider = $(".slider"), $bullets = $(".bullets"); function calculateHeight(){ var height = $(".slide.active").outerHeight(); $slider.height(height); } $(window).resize(function() { calculateHeight(); clearTimeout($.data(this, 'resizeTimer')); }); function resetSlides(){ $(".slide.inactive").removeClass("inactiveRight").removeClass("inactiveLeft"); } function gotoSlide($activeSlide, $slide, className){ $activeSlide.removeClass("active").addClass("inactive "+className); $slide.removeClass("inactive").addClass("active"); calculateHeight(); resetBullets(); setTimeout(resetSlides, 300); } $(".next").on("click", function(){ var $activeSlide = $(".slide.active"), $nextSlide = $activeSlide.next(".slide").length != 0 ? $activeSlide.next(".slide") : $(".slide:first-child"); console.log($nextSlide); gotoSlide($activeSlide, $nextSlide, "inactiveLeft"); }); $(".previous").on("click", function(){ var $activeSlide = $(".slide.active"), $prevSlide = $activeSlide.prev(".slide").length != 0 ? $activeSlide.prev(".slide") : $(".slide:last-child"); gotoSlide($activeSlide, $prevSlide, "inactiveRight"); }); $(document).on("click", ".bullet", function(){ if($(this).hasClass("active")){ return; } var $activeSlide = $(".slide.active"); var currentIndex = $activeSlide.index(); var targetIndex = $(this).index(); console.log(currentIndex, targetIndex); var $theSlide = $(".slide:nth-child("+(targetIndex+1)+")"); gotoSlide($activeSlide, $theSlide, currentIndex > targetIndex ? "inactiveRight" : "inactiveLeft"); }) function addBullets(){ var total = $(".slide").length, index = $(".slide.active").index(); for (var i=0; i < total; i++){ var $bullet = $("<div>").addClass("bullet"); if(i==index){ $bullet.addClass("active"); } $bullets.append($bullet); } } function resetBullets(){ $(".bullet.active").removeClass("active"); var index = $(".slide.active").index()+1; console.log(index); $(".bullet:nth-child("+index+")").addClass("active"); } addBullets(); calculateHeight();
Developer | Daniesy |
Username | daniesy |
Uploaded | January 10, 2023 |
Rating | 4.5 |
Size | 4,674 Kb |
Views | 8,096 |
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 |
Cookie box | 2,560 Kb |
Certificate Badges | 3,276 Kb |
CSS Switches | 2,995 Kb |
Flat css-only countdown and countup | 11,156 Kb |
Profile box | 2,766 Kb |
SVG Badges for CTF365 | 3,085 Kb |
Grand Theft Auto 5 | 3,120 Kb |
Badge certified | 2,767 Kb |
Hot or Not 2 - Image masking with icons | 3,855 Kb |
Simple Dropdown - Vue.js | 3,925 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 |
Gears | Synvox | 3,278 Kb |
CSS Chat Bubbles | Boylett | 2,094 Kb |
CSS Flip Animation | Bbodine1 | 2,525 Kb |
Materializecss input form | Jasonchan | 1,443 Kb |
Automatic scroll | Skeurentjes | 4,042 Kb |
Popover Example | Seanboom | 2,429 Kb |
CSS Google Now | Jackmoran | 3,196 Kb |
Yuliya v krylova | Rafszul | 37,351 Kb |
Getting Started | Viblast | 1,500 Kb |
12 DAYS OF XMAS | Proto78 | 2,313 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!