HTMLify
slider.html
Views: 29 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title> SLIDER | E-COMMERCE WEBSITE </title> <!-- favicon --> <link rel="icon" href="https://yt3.ggpht.com/a/AGF-l78km1YyNXmF0r3-0CycCA0HLA_i6zYn_8NZEg=s900-c-k-c0xffffffff-no-rj-mo" type="image/gif" sizes="16x16"> <!-- EXTERNAL LINKS --> <script src="http://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.min.css"> <style> body { margin: 0; } #containerSlider { margin: auto; width: 90%; text-align: center; padding-top: 100px; box-sizing: border-box; } #containerSlider img { width: 100%; height: 140%; text-align: center; align-content: center; } @media(max-width: 732px) { #containerSlider img { height: 12em; } } @media(max-width: 500px) { #containerSlider img { height: 10em; } } </style> </head> <body> <section> <div id="containerSlider"> <div id="slidingImage"> <img src="img/img1.png" alt="image1"> </div> <div id="slidingImage"> <img src="img/img2.png" alt="image2"> </div> <div id="slidingImage"> <img src="img/img3.png" alt="image3"> </div> <div id="slidingImage"> <img src="img/img4.png" alt="image4"> </div> </div> </section> </body> <!-- <script src=“https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js”></script> --> <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js"></script> <script> $(document).ready(function() { $('#containerSlider').slick({ dots: true, infinite: true, slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, }); }); </script> </html> |