Posted on April 18, 2021, 8 p.m. by Bishal ( 3119)
index.html
index.html
<!DOCTYPE html>
<html>
<head>
<title>Responsive cards - Code With Bishal</title>
</head>
<!-- created by Code With Bishal - www.codewithbishal.com
-->
<body>
</body>
</html>
style.css
<head> </head>
of your HTML document:
<link href="style.css" rel="stylesheet">
style.css
file:*{
margin: 0px;
padding: 0px;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
display: flex;
justify-content: center;
align-items: center;
background:#ffffff9d;
min-height: 100vh;
}
.container{
width: 1000vh;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
.container .column-cards{
position: relative;
width: 290px;
height: 440px;
background: #5cb7ec;
display: flex;
justify-content: center;
align-items: center;
margin: 25px;
box-shadow: 0 15px 45px black;
}
.container .column-cards .column-content{
padding: 40px;
align-items: center;
justify-content: center;
}
.container .column-cards .column-content h2{
position: absolute;
right: 30px;
font-size: 4em;
font-weight: 700;
color: rgb(89, 0, 255);
z-index: 1;
opacity: 0.1;
transition: 500ms;
}
.container .column-cards:hover .column-content h2{
opacity: 1;
transform: translateY(-70px);
}
.container .column-cards .column-content h3{
position: relative;
font-size: 1.5em;
color: white;
z-index: 2;
opacity: 0.4;
letter-spacing: 1px;
transition: 500ms;
}
.container .column-cards .column-content p{
position: relative;
justify-content: center;
align-self: center;
font-size: 1.5em;
color: white;
z-index: 2;
font-weight: 200;
opacity: 0.4;
transition: 500ms;
}
.container .column-cards:hover .column-content h3, .container .column-cards:hover .column-content p{
opacity: 1;
}
.container .column-cards:hover a{
opacity: 1;
letter-spacing: 2px;
transition: 1000ms;
background: rgb(250, 252, 252);
}
a{
display: inline-block;
margin-top: 20px;
padding: 10px 15px;
color: black;
opacity: 0.8;
background: white;
text-decoration: none;
text-transform: uppercase;
font-weight: 900;
}
<!DOCTYPE html>
<html>
<head>
<title>Responsive cards - Code With Bishal</title>
</head>
<!-- created by Code With Bishal - www.codewithbishal.com
-->
<body>
<div class="container">
<div class="column-cards">
<div class="column-content">
<h2>1</h2>
<h3>Post title</h3>
<p>Lorem ipsum dolor sit amet consectetur. Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
<a href="#">Read More</a>
</div>
</div>
<div class="column-cards">
<div class="column-content">
<h2>2</h2>
<h3>Post title</h3>
<p>Lorem ipsum dolor sit amet consectetur. Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
<a href="#">Read More</a>
</div>
</div>
<div class="column-cards">
<div class="column-content">
<h2>3</h2>
<h3>Post title</h3>
<p>Lorem ipsum dolor sit amet consectetur. Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
<a href="#">Read More</a>
</div>
</div>
</div>
</body>
</html>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');
*{
margin: 0px;
padding: 0px;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
display: flex;
justify-content: center;
align-items: center;
background:#ffffff9d;
min-height: 100vh;
}
.container{
width: 1000vh;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
.container .column-cards{
position: relative;
width: 290px;
height: 440px;
background: #5cb7ec;
display: flex;
justify-content: center;
align-items: center;
margin: 25px;
box-shadow: 0 15px 45px black;
}
.container .column-cards .column-content{
padding: 40px;
align-items: center;
justify-content: center;
}
.container .column-cards .column-content h2{
position: absolute;
right: 30px;
font-size: 4em;
font-weight: 700;
color: rgb(89, 0, 255);
z-index: 1;
opacity: 0.1;
transition: 500ms;
}
.container .column-cards:hover .column-content h2{
opacity: 1;
transform: translateY(-70px);
}
.container .column-cards .column-content h3{
position: relative;
font-size: 1.5em;
color: white;
z-index: 2;
opacity: 0.4;
letter-spacing: 1px;
transition: 500ms;
}
.container .column-cards .column-content p{
position: relative;
justify-content: center;
align-self: center;
font-size: 1.5em;
color: white;
z-index: 2;
font-weight: 200;
opacity: 0.4;
transition: 500ms;
}
.container .column-cards:hover .column-content h3, .container .column-cards:hover .column-content p{
opacity: 1;
}
a{
display: inline-block;
margin-top: 20px;
padding: 10px 15px;
color: black;
opacity: 0.8;
background: white;
text-decoration: none;
text-transform: uppercase;
font-weight: 900;
}
.container .column-cards:hover a{
opacity: 1;
letter-spacing: 2px;
transition: 1000ms;
background: rgb(250, 252, 252);
}