Assignment3_work_with_sliders/styles.css

174 lines
2.5 KiB
CSS
Raw Normal View History

* {
2024-12-30 06:22:29 +00:00
margin: 0;
padding: 0;
box-sizing: border-box;
2024-12-30 06:22:29 +00:00
}
body {
background: #f2f2f2;
2024-12-30 06:22:29 +00:00
}
@keyframes slide {
from {
transform: translateX(0);
}
to {
transform: translateX(-100%);
}
2024-12-30 06:22:29 +00:00
}
.logos {
overflow: hidden;
padding: 60px 0;
background: white;
white-space: nowrap;
position: relative;
2024-12-30 06:22:29 +00:00
}
.logos:before,
.logos:after {
position: absolute;
top: 0;
width: 250px;
height: 100%;
content: "";
z-index: 2;
2024-12-30 06:22:29 +00:00
}
.logos:before {
left: 0;
background: linear-gradient(to left, rgba(255, 255, 255, 0), white);
2024-12-30 06:22:29 +00:00
}
.logos:after {
right: 0;
background: linear-gradient(to right, rgba(255, 255, 255, 0), white);
2024-12-30 06:22:29 +00:00
}
.logos:hover .logos-slide {
animation-play-state: paused;
2024-12-30 06:22:29 +00:00
}
.logos-slide {
display: inline-block;
animation: 35s slide infinite linear;
2024-12-30 06:22:29 +00:00
}
.logos-slide img {
height: 50px;
margin: 0 40px;
2024-12-30 06:22:29 +00:00
}
body {
background: #f2f2f2;
display: flex;
flex-direction: column;
min-height: 100vh;
2024-12-30 06:22:29 +00:00
}
.featured-projects {
display: flex;
justify-content: space-between;
padding: 20px;
background-color: white;
margin-bottom: 20px;
border-radius: 10px;
width: 80%;
max-width: 1200px;
margin: 20px auto;
flex-grow: 1;
2024-12-30 06:22:29 +00:00
}
.swiper {
display: flex;
justify-content: space-between;
width: 100%;
gap: 20px;
2024-12-30 06:22:29 +00:00
}
.swiper-slide {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
transition: transform 0.5s ease-in-out;
2024-12-30 06:22:29 +00:00
}
.swiper-slide img {
width: 100%;
height: auto;
max-width: 250px;
height: 300px;
object-fit: cover;
border-radius: 10px;
transition: transform 0.5s, box-shadow 0.5s;
2024-12-30 06:22:29 +00:00
}
.swiper-slide img:hover {
transform: scale(1.05);
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
2024-12-30 06:22:29 +00:00
}
.description-container {
width: 35%;
padding-left: 20px;
display: flex;
flex-direction: column;
justify-content: center;
2024-12-30 06:22:29 +00:00
}
.project-description {
text-align: left;
display: none;
2024-12-30 06:22:29 +00:00
}
.project-description.active {
display: block;
2024-12-30 06:22:29 +00:00
}
.pagination-container {
display: flex;
justify-content: center;
margin-top: 20px;
2024-12-30 06:22:29 +00:00
}
.pagination-button {
width: 12px;
height: 12px;
margin: 0 5px;
border-radius: 50%;
background-color: #888;
cursor: pointer;
transition: background-color 0.3s;
2024-12-30 06:22:29 +00:00
}
.pagination-button.active {
background-color: #333;
2024-12-30 06:22:29 +00:00
}
@media (max-width: 768px) {
.featured-projects {
flex-direction: column;
}
.swiper {
width: 100%;
margin-bottom: 20px;
2024-12-30 06:22:29 +00:00
}
.description-container {
width: 100%;
2024-12-30 06:22:29 +00:00
}
.swiper-slide img {
width: 100%;
2024-12-30 06:22:29 +00:00
}
}
footer {
background-color: #fff;
padding: 20px;
text-align: center;
margin-top: 20px;
}