{"id":131,"date":"2024-05-09T16:37:14","date_gmt":"2024-05-09T16:37:14","guid":{"rendered":"https:\/\/codebox.keyframetechsolution.com\/?p=131"},"modified":"2025-02-08T15:39:10","modified_gmt":"2025-02-08T15:39:10","slug":"infinite-auto-play-carousel","status":"publish","type":"post","link":"https:\/\/codebox.keyframetechsolution.com\/infinite-auto-play-carousel\/","title":{"rendered":"How to Create an Infinite Autoplay Carousel using HTML CSS Only"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><span data-preserver-spaces=\"true\">Carousels are a popular feature on modern websites, allowing the display of images, text, or any content in a scrolling format. Whether it&#8217;s a portfolio, product showcase, or promotional content, it grabs attention and enhances the user experience. <\/span><\/p>\n<p><span data-preserver-spaces=\"true\">In this guide, we&#8217;ll show you how to create an infinite autoplay carousel using HTML and CSS without relying on JavaScript or external libraries, a worthwhile project that adds a dynamic touch to your website.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Let\u2019s dive into how you can bring this design into your projects.<\/span><\/p>\n<p>\u2705 <strong>Watch Live Preview<\/strong> \ud83d\udc49\ud83d\udc49<\/p>\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/G8TkkpC3XbI?si=amJRJpA9-8P-trkg\" width=\"100%\" height=\"450\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p><span data-preserver-spaces=\"true\"><a href=\"#conclusion\">Click Here to Download the Code<\/a><\/span><\/p>\n<h2><strong><span data-preserver-spaces=\"true\">What is an Infinite Autoplay Carousel?<\/span><\/strong><\/h2>\n<p>An infinite autoplay carousel is a slider that continuously scrolls through content. Once it reaches the end, it loops back to the beginning, creating a seamless, never-ending effect. It&#8217;s perfect for showcasing featured products, client logos, testimonials, or any content you want to highlight in an engaging and visually appealing way.<\/p>\n<p><strong>Similar Posts &#8211; <\/strong><a href=\"https:\/\/codebox.keyframetechsolution.com\/autoplay-carousel-html-css-js\/\">How to Create Autoplay Carousel using HTML CSS and JavaScript<\/a><\/p>\n<h3><strong>Why Use This?<\/strong><\/h3>\n<p>It continuously loops content, ensuring a seamless and smooth user experience. Here are some key benefits:<\/p>\n<ul>\n<li><strong>Visual Appeal<\/strong>: Keeps users engaged with dynamic, interactive content.<\/li>\n<li><strong>Space-Saving<\/strong>: Displays multiple items within a limited screen space.<\/li>\n<li><strong>Ease of Navigation<\/strong>: Automatically scroll through items, eliminating the need for user interaction.<\/li>\n<li><strong>Modern Design<\/strong>: Enhances the overall aesthetic of your website.<\/li>\n<\/ul>\n<h3><strong>What are the Steps to Create It?<\/span><\/strong><\/h3>\n<h4>Set Up Project<\/h4>\n<p>Create a folder on your computer and add the following files inside it:<\/p>\n<ul>\n<li><strong>index.html<\/strong><\/li>\n<li><strong>style.css<\/strong><\/li>\n<li><strong>script.js<\/strong><\/li>\n<\/ul>\n<h2><strong><span data-preserver-spaces=\"true\">Source Code<\/span><\/strong><\/h2>\n<h3><strong><span data-preserver-spaces=\"true\">HTML Code Structure<\/span><\/strong><\/h3>\n<div class=\"code-container\">\n<div class=\"toolbar\">\n<div class=\"actions\">\n        <span><\/span><br \/>\n        <span class=\"yellow\"><\/span><br \/>\n        <span class=\"green\"><\/span>\n      <\/div>\n<div class=\"title\">index.html<\/div>\n<\/p><\/div>\n<div class=\"code-content\">\n<pre><code class=\"language-markup\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"UTF-8\"&gt;\r\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n  &lt;title&gt;Create an Infinite Auto Play Carousel using HTML CSS Only&lt;\/title&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/4.7.0\/css\/font-awesome.min.css\"&gt;\r\n  &lt;script src=\"https:\/\/code.jquery.com\/jquery-3.5.1.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/typed.js\/2.0.11\/typed.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/waypoints\/4.0.1\/jquery.waypoints.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@400;500;600;700&amp;family=Ubuntu:wght@400;500;700&amp;display=swap\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- CODE --&gt;\r\n\r\n&lt;script src=\"script.js\"&gt;&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<h3><strong><span data-preserver-spaces=\"true\">CSS Code Structure<\/span><\/strong><\/h3>\n<div class=\"code-container\">\n<div class=\"toolbar\">\n<div class=\"actions\">\n        <span><\/span><br \/>\n        <span class=\"yellow\"><\/span><br \/>\n        <span class=\"green\"><\/span>\n      <\/div>\n<div class=\"title\">style.css<\/div>\n<\/p><\/div>\n<div class=\"code-content\">\n<pre><code class=\"language-markup\">\r\n&lt; \/* Your CSS code here *\/ &gt;\r\n&lt; * { &gt;\r\n\r\n&lt; margin: 0; &gt;\r\n&lt; padding: 0 &gt;\r\n&lt; box-sizing: border-box; &gt;\r\n&lt;     text-decoration: none; &gt;\r\n&lt;     } &gt;\r\n      <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<h2 id=\"conclusion\"><span data-preserver-spaces=\"true\">Conclusion<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">Building an infinite autoplay carousel is a simple yet powerful way to elevate your website. It combines functionality with design, creating a seamless browsing experience<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Whether you\u2019re showcasing products or simply enhancing your design, this slider is sure to leave a lasting impression. So, grab your favorite text editor and start experimenting\u2014you\u2019ll be amazed at what you can create with just a few lines of code.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Feel free to customize the carousel to suit your needs, such as changing the colors, adding images, or integrating interactive elements. With practice, <\/span><span data-preserver-spaces=\"true\">you\u2019ll be able to<\/span><span data-preserver-spaces=\"true\"> create more complex and visually stunning carousels for your web projects.<\/span><\/p>\n<p><strong><i class=\"fa fa-download\" style=\"color: #046bd2;\"><\/i> 44 people bought this<\/strong><\/p>\n<p><strong>Grab it Now for Just <i class=\"fa fa-rupee\" style=\"color:#046bd2;\"><\/i><span style=\"color:#046bd2;\">30<\/span><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Carousels are a popular feature on modern websites, allowing the display of images, text, or any content in a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":132,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[295,353,293,352],"class_list":["post-131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-image-slider","tag-autoplay-slider-css","tag-infinite-autoplay-carousel-source-code","tag-infinite-autoplay-slider-html-css","tag-infinite-carousel-slider"],"acf":[],"_links":{"self":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":17,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":1452,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/131\/revisions\/1452"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/media\/132"}],"wp:attachment":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}