0% found this document useful (0 votes)
3 views

Css Project Infinite

This document provides the HTML and CSS code for creating a modern infinite carousel. The carousel features a flexible layout with images that scroll continuously and includes hover effects for interactivity. Users are advised to change the image paths according to their own images.

Uploaded by

Naziya Parveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Css Project Infinite

This document provides the HTML and CSS code for creating a modern infinite carousel. The carousel features a flexible layout with images that scroll continuously and includes hover effects for interactivity. Users are advised to change the image paths according to their own images.

Uploaded by

Naziya Parveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Css project

Infinite Carousel

HTMl & CSS code:


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern Infinite Carousel</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #b0b8c4;
}
.carousel {
width: 80%;
max-width: 8000px;
overflow: hidden;
position: relative;
border-radius: 15px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
background: #1e1e1e;
padding: 50px;
}
.carousel-track {
display: flex;
width: calc(300px * 6);
animation: scroll 10s linear infinite;
}
.carousel img {
width: 250px;
height: 350px;
object-fit: cover;
margin: 0 13px;
border-radius: 15px;
transition: transform 0.3s ease-in-out;
}
.carousel img:hover {
transform: scale(1.05);
}
@keyframes scroll {
0% { transform: translateX(0); }
100% { transform: translateX(-50%); }
}
</style>
</head>
<body>
<div class="carousel">
<div class="carousel-track">
<img src="img1.webp" alt="Image 1">
<img src="img2.webp" alt="Image 2">
<img src="img3.webp" alt="Image 3">
<img src="img4.webp" alt="Image 1">
<img src="img5.webp" alt="Image 2">
<img src="img6-1.webp" alt="Image 3">
</div>
</div>
</body>
</html>

*NOTE: change img path according to your image!

You might also like