.element {
-webkit-mask-image: url(mask.png);
mask-image: url(mask.png);
-webkit-mask-size: cover;
mask-size: cover;
}
/* 使用渐变作为遮罩 */
.element {
-webkit-mask-image: linear-gradient(to bottom, black, transparent);
mask-image: linear-gradient(to bottom, black, transparent);
}
.image-card {
position: relative;
overflow: hidden;
border-radius: 8px;
}
.image-card img {
transition: transform 0.5s ease;
}
.image-card:hover img {
transform: scale(1.1);
filter: brightness(1.2);
}
.image-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
opacity: 0;
transition: opacity 0.3s ease;
}
.image-card:hover .image-overlay {
opacity: 1;
}
.wave-bg {
position: relative;
background: #3498db;
color: white;
padding: 100px 0;
}
.wave-bg::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100px;
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="1" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
background-size: 1440px 100px;
}