<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<div class="card">
<div class="card-image"></div>
<div class="card-text">
<span class="date">4 days ago</span>
<h2>Post One</h2>
<p>Lorem ipsum dolor sit amet consectetur, Ducimus, repudiandae temporibus omnis illum maxime quod deserunt eligendi dolor</p>
</div>
<div class="card-stats">
<div class="stat">
<div class="value">4<sup>m</sup></div>
<div class="type">read</div>
</div>
<div class="stat border">
<div class="value">5123</div>
<div class="type">views</div>
</div>
<div class="stat">
<div class="value">32</div>
<div class="type">comments</div>
</div>
</div>
</div>
<div class="card">
<div class="card-image card2"></div>
<div class="card-text card2">
<span class="date">1 week ago</span>
<h2>Post Two</h2>
<p>Adipisicing elit. Ducimus, repudiandae corrupti amet temporibus omnis provident illum maxime quod. Lorem ipsum dolor</p>
</div>
<div class="card-stats card2">
<div class="stat">
<div class="value">7<sup>m</sup></div>
<div class="type">read</div>
</div>
<div class="stat border">
<div class="value">7152</div>
<div class="type">views</div>
</div>
<div class="stat">
<div class="value">21</div>
<div class="type">comments</div>
</div>
</div>
</div>
<div class="card">
<div class="card-image card3"></div>
<div class="card-text card3">
<span class="date">3 week ago</span>
<h2>Post Three</h2>
<p>Repudiandae corrupti amet temporibus omnis provident illum maxime. Ducimus, lorem ipsum dolor adipisicing elit</p>
</div>
<div class="card-stats card3">
<div class="stat">
<div class="value">5<sup>m</sup></div>
<div class="type">read</div>
</div>
<div class="stat border">
<div class="value">3021</div>
<div class="type">views</div>
</div>
<div class="stat">
<div class="value">15</div>
<div class="type">comments</div>
</div>
</div>
</div>
</body>
</html>
body {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background:url("https://source.unsplash.com/2800x1440/?background,dark,black,pattern");
overflow: hidden;
}
.card {
display: grid;
grid-template-columns: 300px;
grid-template-rows: 210px 210px 80px;
grid-template-areas: "image" "text" "stats";
border-radius: 18px;
background: white;
box-shadow: 5px 5px 15px rgba(0,0,0,0.9);
font-family: roboto;
text-align: center;
transition: 0.5s ease;
cursor: pointer;
margin:30px;
}
.card-image {
grid-area: image;
background: url("https://picsum.photos/320/300");
border-top-left-radius: 15px;
border-top-right-radius: 15px;
background-size: cover;
}
.card-text {
grid-area: text;
margin: 25px;
}
.card-text .date {
color: rgb(255, 7, 110);
font-size:13px;
}
.card-text p {
color: grey;
font-size:15px;
font-weight: 300;
}
.card-text h2 {
margin-top:0px;
font-size:28px;
}
.card-stats {
grid-area: stats;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
background: rgb(255, 7, 110);
}
.card-stats .stat {
padding:10px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
color: white;
}
.card-stats .border {
border-left: 1px solid rgb(172, 26, 87);
border-right: 1px solid rgb(172, 26, 87);
}
.card-stats .value{
font-size:22px;
font-weight: 500;
}
.card-stats .value sup{
font-size:12px;
}
.card-stats .type{
font-size:11px;
font-weight: 300;
text-transform: uppercase;
}
.card:hover {
transform: scale(1.15);
box-shadow: 5px 5px 15px rgba(0,0,0,0.6);
}
/*card2*/
.card-image.card2 {
background: url("https://picsum.photos/320/301");
background-size: cover;
}
.card-text.card2 .date {
color: rgb(255, 77, 7);
}
.card-stats.card2 .border {
border-left: 1px solid rgb(185, 67, 20);
border-right: 1px solid rgb(185, 67, 20);
}
.card-stats.card2 {
background: rgb(255, 77, 7);
}
/*card3*/
.card-image.card3 {
background: url("https://picsum.photos/320/302");
background-size: cover;
}
.card-text.card3 .date {
color: rgb(0, 189, 63);
}
.card-stats.card3 .border {
border-left: 1px solid rgb(14, 122, 50);
border-right: 1px solid rgb(14, 122, 50);
}
.card-stats.card3 {
background: rgb(0, 189, 63);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.