Notes
HTML
CSS
JS
Tools
Code Snippets
HTML Entity
About
Contact Us
Simple Carousel Using Slick Carousel
HTML
CSS
JS
Output
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.css" integrity="sha512-wR4oNhLBHf7smjy0K4oqzdWumd+r5/+6QO/vDda76MW5iug4PT7v86FoEkySIJft3XA0Ae6axhIvHrqwm793Nw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.css" integrity="sha512-6lLUdeQ5uheMFbWm3CP271l14RsX1xtx+J5x2yeIDkkiBpeVTNhTqijME7GgRKKi6hCqovwCoBTlRBEC20M8Mg==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <title>Simple Carousel Using Slick Carousel</title> </head> <body> <h1 class="main-heading mt-4">Simple Carousel Using Slick Carousel</h1> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="slick-div"> <div class="yourClass"> <div class="each-item">your content 1</div> <div class="each-item">your content 2</div> <div class="each-item">your content 3</div> <div class="each-item">your content 4</div> <div class="each-item">your content 5</div> </div> </div> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" integrity="sha512-XtmMtDEcNz2j7ekrtHvOVR4iwwaD6o/FUJe6+Zq+HgcCsk3kj4uSQQR8weQ2QVj1o0Pk6PwYLohm206ZzNfubg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> </body> </html>
Copied
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.css" integrity="sha512-wR4oNhLBHf7smjy0K4oqzdWumd+r5/+6QO/vDda76MW5iug4PT7v86FoEkySIJft3XA0Ae6axhIvHrqwm793Nw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.css" integrity="sha512-6lLUdeQ5uheMFbWm3CP271l14RsX1xtx+J5x2yeIDkkiBpeVTNhTqijME7GgRKKi6hCqovwCoBTlRBEC20M8Mg==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <title>Simple Carousel Using Slick Carousel</title> </head> <body> <h1 class="main-heading mt-4">Simple Carousel Using Slick Carousel</h1> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="slick-div"> <div class="yourClass"> <div class="each-item">your content 1</div> <div class="each-item">your content 2</div> <div class="each-item">your content 3</div> <div class="each-item">your content 4</div> <div class="each-item">your content 5</div> </div> </div> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" integrity="sha512-XtmMtDEcNz2j7ekrtHvOVR4iwwaD6o/FUJe6+Zq+HgcCsk3kj4uSQQR8weQ2QVj1o0Pk6PwYLohm206ZzNfubg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> </body> </html>
CSS
body { background: darkblue; } .main-heading { color: #fff; text-align: center; padding: 3rem; font-size: 22px; } .each-item { padding: 25px; background-color: blue; color: white; margin-right: 15px; text-align: center; display: block; } .slick-slide { margin: 0px 20px; } .slick-dots li button { display: none; }
Copied
body { background: darkblue; } .main-heading { color: #fff; text-align: center; padding: 3rem; font-size: 22px; } .each-item { padding: 25px; background-color: blue; color: white; margin-right: 15px; text-align: center; display: block; } .slick-slide { margin: 0px 20px; } .slick-dots li button { display: none; }
JS
$(document).ready(function(){ $('.yourClass').slick({ slidesToShow: 4, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, responsive: [ { breakpoint: 1025, settings: { slidesToShow: 3, infinite: true, dots: true } }, { breakpoint: 769, settings: { slidesToShow: 2, } }, { breakpoint: 500, settings: { slidesToShow: 1, } } ] }); }); addEventListener(document, "touchstart", function(e) { console.log(e.defaultPrevented); e.preventDefault(); console.log(e.defaultPrevented); }, Modernizr.passiveeventlisteners ? {passive: true} : false);
Copied
$(document).ready(function(){ $('.yourClass').slick({ slidesToShow: 4, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, responsive: [ { breakpoint: 1025, settings: { slidesToShow: 3, infinite: true, dots: true } }, { breakpoint: 769, settings: { slidesToShow: 2, } }, { breakpoint: 500, settings: { slidesToShow: 1, } } ] }); }); addEventListener(document, "touchstart", function(e) { console.log(e.defaultPrevented); e.preventDefault(); console.log(e.defaultPrevented); }, Modernizr.passiveeventlisteners ? {passive: true} : false);
Output
Our Courses
HTML 5
CSS
JavaScript
MySql
PHP
Laravel
Bootstrap
Programming Tutorial
PHP
JavaScript
HTML
Laravel
MySQL
JQuery
CSS
Git
Bootstrap
Vue JS
Android
Python
Server
Code Snippets
Chat Box
Range Slider
Radio Button
Select Box
Nav Bar
Other
Testimonial
Carousel
Logo
Loader
Lightbox
Forms
Popup
Table
HTML Course Code
HTML Entity
↑→ Arrows
$¢ Currency
Aö Letters
%+ Math
1¾ Numbers
&— Punctuation
©™ Symbols
Best Of
Internet
Technology
Health
Travel
Onine Tools
CSS Minifier
Text Converter
Age Calculator
Pincode Details
Whiteboard
PDF to Text
Gradient Generator
PX to REM Converter
REM to PX Converter
PX to EM Converter
EM to PX Converter
WEBP Converter
Latest & Upcoming movies
Bollywood
Hollywood
Tamil
Telgu
Bangla
Web Series
Notes
HTML
CSS
JS