Carousel Gallery
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
margin: 0;
}
.carousel {
position: relative;
width: 80%;
max-width: 600px;
overflow: hidden;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.carousel-inner {
display: flex;
transition: transform 0.5s ease-in-out;
}
.carousel-item {
min-width: 100%;
transition: opacity 0.5s ease-in-out;
}
.carousel-item img {
width: 100%;
border-radius: 10px;
}
.carousel-control {
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: rgba(0, 0, 0, 0.5);
color: white;
border: none;
padding: 10px;
cursor: pointer;
border-radius: 5px;
}
.carousel-control.prev {
left: 10px;
}
.carousel-control.next {
right: 10px;
}