<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=1" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=31" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=2" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=3" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=4" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=5" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=6" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=7" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=8" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=9" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=10" width="966" height="358" alt="" />
</div>
</div>
<div class="card">
<div class="card__tag">
Must Try
</div>
<div class="card__content">
<h2>Card Title</h2>
<p>Some des will go here and I need it to wrap into lines</p>
</div>
<div class="card__thumb">
<img src="https://picsum.photos/966/358?random=11" width="966" height="358" alt="" />
</div>
</div>
<div class="tutorials">
<a href="https://s.juejin.cn/ds/idBv71cd" target="_blank">
<svg t="1696988571607" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4422" width="200" height="200">
<path d="M924.8 576.64v-115.2c12.8-13.44 13.44-26.88 12.8-34.56-3.2-30.08-36.48-42.24-47.36-46.72-79.36-30.08-226.56-89.6-307.84-122.88-49.28-24.32-65.28-19.84-113.28-0.64-12.8 5.12-224.64 83.84-306.56 117.76-44.8 18.56-51.2 46.08-51.2 61.44 0 25.6 17.92 48.64 50.56 62.08L259.84 537.6v257.28l8.32 8.32c3.84 3.84 91.52 92.16 252.16 92.16 150.4 0 236.16-88.96 240-92.8l7.68-8.32V540.16l36.48-15.36-1.28 52.48-29.44 49.28 88.96 84.48 98.56-85.76-36.48-48.64zM710.4 771.2c-22.4 18.56-88.96 67.2-190.08 67.2-111.36 0-179.84-48.64-202.88-67.2V561.28l144.64 58.88h0.64c46.08 17.28 81.28 16 125.44-3.2l122.24-51.84v206.08z m154.24-138.24l-17.92-16.64 13.44-22.4 2.56-102.4c4.48-14.08-0.64-25.6-8.32-32-7.68-7.04-21.76-11.52-36.48-2.56L565.12 563.84c-30.08 13.44-49.92 14.08-81.92 2.56l-298.88-121.6c-7.68-3.2-12.16-6.4-14.08-8.96 1.92-1.92 6.4-5.12 14.72-8.96 81.92-33.92 302.72-116.48 305.28-117.12h0.64c38.4-15.36 38.4-15.36 67.2-0.64l1.92 0.64c80.64 32.64 226.56 92.16 307.2 122.88v163.2l16 21.12-18.56 16z" p-id="4423"></path>
</svg>
</a>
</div>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
min-height: 100vh;
font-family: "Exo", Arial, sans-serif;
background-color: #557;
padding: 20px;
display: grid;
place-content: center;
gap: 20px;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
background-color: #fff;
border-radius: 5px;
border: 1px solid #e8e0e0;
box-shadow: 0 3px 10px 0 rgb(0 0 0 / 0.3);
padding: 5px;
display: grid;
}
img {
max-width: 100%;
aspect-ratio: 4 / 3;
object-fit: cover;
object-position: center;
border-radius: 5px;
vertical-align: top;
}
.card__content {
color: #fff;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 10px;
background-image: linear-gradient(to top, rgb(0 0 0 / 0.4), rgb(0 0 0 / 0));
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
border-radius: 5px;
}
.card__thumb,
.card__content,
.card__tag {
grid-area: 1 / -1;
}
.card__tag {
background-color: #2196f3;
color: #fff;
padding: 10px 15px;
}
.card__content {
z-index: 2;
}
.card__tag {
align-self: start;
justify-self: start;
z-index: 3;
margin-top: 2rem;
border-radius: 0 10rem 10rem 0;
}
.card:nth-child(1) .card__content {
background-image: linear-gradient(to top, rgb(0 0 0 / 0.4), rgb(0 0 0 / 0));
}
.card:nth-child(2) .card__content {
background-image: linear-gradient(to top, rgb(0 0 0 / 0.4), rgb(0 0 0 / 0));
background-size: 100% 42.5%;
background-position: left bottom;
background-repeat: no-repeat;
}
.card:nth-child(3) .card__content {
background-image: linear-gradient(
to top,
hsla(0, 0%, 0%, 0.62) 0%,
hsla(0, 0%, 0%, 0.614) 7.5%,
hsla(0, 0%, 0%, 0.596) 13.5%,
hsla(0, 0%, 0%, 0.569) 18.2%,
hsla(0, 0%, 0%, 0.533) 22%,
hsla(0, 0%, 0%, 0.49) 25.3%,
hsla(0, 0%, 0%, 0.441) 28.3%,
hsla(0, 0%, 0%, 0.388) 31.4%,
hsla(0, 0%, 0%, 0.333) 35%,
hsla(0, 0%, 0%, 0.277) 39.3%,
hsla(0, 0%, 0%, 0.221) 44.7%,
hsla(0, 0%, 0%, 0.167) 51.6%,
hsla(0, 0%, 0%, 0.117) 60.2%,
hsla(0, 0%, 0%, 0.071) 70.9%,
hsla(0, 0%, 0%, 0.032) 84.1%,
hsla(0, 0%, 0%, 0) 100%
);
}
.card:nth-child(4)::after {
content: "";
grid-area: 1 / -1;
opacity: 0.5;
background-image: conic-gradient(
from 90deg at 40% -25%,
#ffd700,
#f79d03,
#ee6907,
#e6390a,
#de0d0d,
#d61039,
#cf1261,
#c71585,
#cf1261,
#d61039,
#de0d0d,
#ee6907,
#f79d03,
#ffd700,
#ffd700,
#ffd700
);
}
.card:nth-child(5) .card__content {
background-image: linear-gradient(
to right,
hsl(0, 0%, 0%) 0%,
hsla(0, 0%, 0%, 0.964) 7.4%,
hsla(0, 0%, 0%, 0.918) 15.3%,
hsla(0, 0%, 0%, 0.862) 23.4%,
hsla(0, 0%, 0%, 0.799) 31.6%,
hsla(0, 0%, 0%, 0.73) 39.9%,
hsla(0, 0%, 0%, 0.655) 48.2%,
hsla(0, 0%, 0%, 0.577) 56.2%,
hsla(0, 0%, 0%, 0.497) 64%,
hsla(0, 0%, 0%, 0.417) 71.3%,
hsla(0, 0%, 0%, 0.337) 78.1%,
hsla(0, 0%, 0%, 0.259) 84.2%,
hsla(0, 0%, 0%, 0.186) 89.6%,
hsla(0, 0%, 0%, 0.117) 94.1%,
hsla(0, 0%, 0%, 0.054) 97.6%,
hsla(0, 0%, 0%, 0) 100%
);
}
.card:nth-child(6) .card__content {
background-image: radial-gradient(
ellipse 100% 100% at right center,
transparent 80%,
#000
);
}
.card:nth-child(7) .card__content {
background-color: rgb(0 0 0 / 0.6);
}
.card:nth-child(8) .card__content {
background-color: rgba(0, 0, 0, 0.4);
background-image: linear-gradient(
to top,
rgba(0, 0, 0, 0.8),
rgba(0, 0, 0, 0) 60%,
rgba(0, 0, 0, 0.8) 100%
);
}
.card:nth-child(9)::before {
content: "";
grid-area: 1 / -1;
background-color: #000;
z-index: -1;
}
.card:nth-child(9) .card__thumb {
opacity: 0.5;
}
.card:nth-child(10) .card__content {
background-color: rgba(255, 255, 255, 0.06);
backdrop-filter: blur(5px);
}
.card:nth-child(11) .card__thumb {
filter: grayscale(1);
}
.tutorials {
position: fixed;
bottom: 1rem;
right: 1rem;
z-index: 9999;
width: 64px;
aspect-ratio: 1;
border-radius: 50%;
background: #3f517e;
padding: 0.5rem;
display: grid;
place-content: center;
transition: all 0.28s linear;
&:hover {
background: #4161b2;
}
& svg {
display: block;
width: 100%;
height: 100%;
filter: invert(1);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.