Page slider
How do I make an page slider?
What is a page slider? How do you make a page slider? This script and codes were developed by Yuri Morini on 24 November 2022, Thursday.
Page slider - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Page slider</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container o0">
<div class="page p1"> <div class="label">Pagina 1</div>
</div>
<div class="page p2"> <div class="label">Pagina 2</div>
</div>
<div class="page p3"> <div class="label">Pagina 3</div>
</div>
<div class="page p4"> <div class="label">Pagina 4</div>
</div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Page slider - Script Codes CSS Codes
body, html { margin:0; padding:0; width:100%; height:100%; background:#000; color:#fff; overflow:hidden;
}
.container { width:100%; height:100%; -webkit-transform: translateX(0); -moz-transform: translateX(0); -me-transform: translateX(0); transform: translateX(0); -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; transition: all 1s ease;
}
.container.o0 { -webkit-transform: translateX(0); -moz-transform: translateX(0); -me-transform: translateX(0); transform: translateX(0);
}
.container.o1 { -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); -me-transform: translateX(-100%); transform: translateX(-100%);
}
.container.o2 { -webkit-transform: translateX(-200%); -moz-transform: translateX(-200%); -me-transform: translateX(-200%); transform: translateX(-200%);
}
.container.o3 { -webkit-transform: translateX(-300%); -moz-transform: translateX(-300%); -me-transform: translateX(-300%); transform: translateX(-300%);
}
.page { width:100%; height:100%; position:absolute; font-size: 30px; font-family: Arial;
}
.label { margin:20px;
}
.p1 { left:0; background-color:#000;
}
.p2 { left:100%; background-color:#222;
}
.p3 { left:200%; background-color:#444;
}
.p4 { left:300%; background-color:#666;
}
Page slider - Script Codes JS Codes
var actual = 'o0';
setInterval(function() { var cls = $('.container').removeClass(actual); var index = parseInt(actual.substr(1), 10); var newIndex = ((index + 1) % 4); actual = 'o' + newIndex; $('.container').addClass(actual); console.log(index + ' ' + newIndex + ' ' + actual);
}, 2000);
Developer | Yuri Morini |
Username | yurimorini |
Uploaded | November 24, 2022 |
Rating | 3 |
Size | 2,044 Kb |
Views | 20,240 |
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 |
Albino button | 1,505 Kb |
Testing vertical flex | 2,131 Kb |
Extra canvas menu | 2,183 Kb |
Unsubscribe dialog | 2,584 Kb |
Ecommerce pins | 20,290 Kb |
Animation test | 1,998 Kb |
SVG clipped path accordion | 3,035 Kb |
Foundation Reveal error | 2,048 Kb |
Fixed rotated square loader test | 1,657 Kb |
A Pen by Yuri Morini | 2,464 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 |
IbrahimJabbari-Effect14 | Ibrahimjabbari | 1,919 Kb |
Javascript Welcome | Peterlewicki | 1,573 Kb |
Day 1 - Portfolio | Chpecson | 3,532 Kb |
Single element checkbox | Ivijaygupta | 1,996 Kb |
A Pen by boilzzz | Boilzzz | 2,761 Kb |
Animating characters with jQuery | 042 | 2,776 Kb |
Print element on a page | Mrs_snow | 2,081 Kb |
The Fly | GianlucaGuarini | 3,405 Kb |
A Pen by James Podles | Jpod | 2,656 Kb |
JS Countdown Timer | Ayoungh | 2,435 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!