Best online tutorial for beginner web designers to learn how to create CSS Responsive Testimonials Card UI Design Using Grid on hover effect with two easy steps.
Create file and write the following HTML Coding on editor then save as .html extension.
index.html
<!DOCTYPE html>
<html>
<head>
<title>Responsive Testimonials Card UI Design Using CSS Grid Cool CSS Hover Effects</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="testimonials">
<div class="card">
<div class="layer"></div>
<div class="content">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.</p>
<div class="image">
<img src="img.jpg">
</div>
<div class="details">
<h2>Someone Famous<br><span>Website Designer</span></h2>
</div>
</div>
</div>
<div class="card">
<div class="layer"></div>
<div class="content">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.</p>
<div class="image">
<img src="img.jpg">
</div>
<div class="details">
<h2>Someone Famous<br><span>Website Designer</span></h2>
</div>
</div>
</div>
<div class="card">
<div class="layer"></div>
<div class="content">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.</p>
<div class="image">
<img src="img1.jpg">
</div>
<div class="details">
<h2>Someone Famous<br><span>Website Designer</span></h2>
</div>
</div>
</div>
</div>
</body>
</html>
Create another file and write the following CSS Coding on editor then save as .css extension.
style.css
body
{
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font-family: sans-serif;
background: #262626;
}
.testimonials
{
margin: 200px auto 100px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px,1fr));
grid-gap: 20px;
}
.testimonials .card
{
position: relative;
width:350px;
margin: 0 auto;
background:#333;
padding: 20px;
box-sizing: border-box;
text-align: center;
box-shadow: 0 10px 40px rgba(0,0,0,.5);
overflow: hidden;
}
.testimonials .card .layer
{
position: absolute;
top:calc(100% - 2px);
left:0;
width:100%;
height: 100%;
background: linear-gradient(#03a9f4, #e91ee3);
z-index: 1;
transition: 0.5s;
}
.testimonials .card:hover .layer
{
top: 0;
}
.testimonials .card .content
{
position: relative;
z-index: 2;
}
.testimonials .card .content p
{
font-size: 18px;
line-height: 24px;
color:#fff;
}
.testimonials .card .content .image
{
width: 100px;
height: 100px;
margin: 0 auto;
border-radius: 50%;
overflow: hidden;
border: 4px solid #fff;
box-shadow: 0 10px 20px rgba(0,0,0,.2);
}
.testimonials .card .content .details h2
{
font-size: 18px;
color: #fff;
}
.testimonials .card .content .details h2 span
{
color: #03a9f4;
font-size: 14px;
transition: 0.5s;
}
.testimonials .card:hover .content .details h2 span
{
color: #fff;
}
#html #css #javascript