RESPONSIVE CARDS
These are awesome and responsive cards .
HTML code:<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"><link rel="stylesheet" href="style.css"></head><body><div class="row"> <div class="column"> <div class="card"> <img src="1.jpg" style="width:150px;height:auto;padding-top:10px"> <h1>Json watson</h1> <p class="title">CEO & Founder</p> <p>Oxford university</p> <a href="#"><i class="fa fa-instagram"></i></a> <a href="#"><i class="fa fa-twitter"></i></a> <a href="#"><i class="fa fa-dribbble"></i></a> <a href="#"><i class="fa fa-facebook"></i></a> <p><button>Contact</button></p> </div> </div>
<div class="column"> <div class="card"> <img src="3.jpg" style="width:150px;height:auto;padding-top:10px"> <h1>Jon watson</h1> <p class="title">CEO & Founder</p> <p>Oxford university</p> <a href="#"><i class="fa fa-instagram"></i></a> <a href="#"><i class="fa fa-twitter"></i></a> <a href="#"><i class="fa fa-dribbble"></i></a> <a href="#"><i class="fa fa-facebook"></i></a> <p><button>Contact</button></p> </div> </div>
<div class="column"> <div class="card"> <img src="2.png" style="width:150px;height:auto;padding-top:10px"> <h1>Nick watson</h1> <p class="title">CEO & Founder</p> <p>Oxford university</p> <a href="#"><i class="fa fa-instagram"></i></a> <a href="#"><i class="fa fa-twitter"></i></a> <a href="#"><i class="fa fa-dribbble"></i></a> <a href="#"><i class="fa fa-facebook"></i></a> <p><button>Contact</button></p> </div> </div>
<div class="column"> <div class="card"> <img src="4.png" style="width:150px;height:auto;padding-top:10px"> <h1>Joy watson</h1> <p class="title">CEO & Founder</p> <p>Oxford university</p> <a href="#"><i class="fa fa-instagram"></i></a> <a href="#"><i class="fa fa-twitter"></i></a> <a href="#"><i class="fa fa-dribbble"></i></a> <a href="#"><i class="fa fa-facebook"></i></a> <p><button>Contact</button></p> </div> </div></div></body></html>
And the CSS code:
* { box-sizing: border-box;}
body { font-family: Arial, Helvetica, sans-serif; background-color: #70daa8;}
.column { width: 25%; float: left; padding: 100px 10px;}
.row:after { content: ""; display: table; clear: both;}
@media screen and (max-width:600px) { .column { width: 100%; display: block; margin-bottom: 20px; }}
.column .card { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); max-width: 300px; margin: auto; margin-top: 50px; background-color: white; text-align: center; border-radius: 40px; padding-bottom: 15px;}
.title { color: gray; font-size: 18px;}
button { border: none; padding: 8px; display: inline-block; color: white; background-color: black; cursor: pointer; width: 70%; border-radius: 20px; font-size: 18px; text-align: center;}
a { text-decoration: none; font-size: 22px; color: black;}
a:hover,button:hover { opacity: 0.6;}
IMAGES:
For the code file and image file visit the Link
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="row">
<div class="column">
<div class="card">
<img src="1.jpg" style="width:150px;height:auto;padding-top:10px">
<h1>Json watson</h1>
<p class="title">CEO & Founder</p>
<p>Oxford university</p>
<a href="#"><i class="fa fa-instagram"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-dribbble"></i></a>
<a href="#"><i class="fa fa-facebook"></i></a>
<p><button>Contact</button></p>
</div>
</div>
<div class="column">
<div class="card">
<img src="3.jpg" style="width:150px;height:auto;padding-top:10px">
<h1>Jon watson</h1>
<p class="title">CEO & Founder</p>
<p>Oxford university</p>
<a href="#"><i class="fa fa-instagram"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-dribbble"></i></a>
<a href="#"><i class="fa fa-facebook"></i></a>
<p><button>Contact</button></p>
</div>
</div>
<div class="column">
<div class="card">
<img src="2.png" style="width:150px;height:auto;padding-top:10px">
<h1>Nick watson</h1>
<p class="title">CEO & Founder</p>
<p>Oxford university</p>
<a href="#"><i class="fa fa-instagram"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-dribbble"></i></a>
<a href="#"><i class="fa fa-facebook"></i></a>
<p><button>Contact</button></p>
</div>
</div>
<div class="column">
<div class="card">
<img src="4.png" style="width:150px;height:auto;padding-top:10px">
<h1>Joy watson</h1>
<p class="title">CEO & Founder</p>
<p>Oxford university</p>
<a href="#"><i class="fa fa-instagram"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-dribbble"></i></a>
<a href="#"><i class="fa fa-facebook"></i></a>
<p><button>Contact</button></p>
</div>
</div>
</div>
</body>
</html>
* {
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #70daa8;
}
.column {
width: 25%;
float: left;
padding: 100px 10px;
}
.row:after {
content: "";
display: table;
clear: both;
}
@media screen and (max-width:600px) {
.column {
width: 100%;
display: block;
margin-bottom: 20px;
}
}
.column .card {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
max-width: 300px;
margin: auto;
margin-top: 50px;
background-color: white;
text-align: center;
border-radius: 40px;
padding-bottom: 15px;
}
.title {
color: gray;
font-size: 18px;
}
button {
border: none;
padding: 8px;
display: inline-block;
color: white;
background-color: black;
cursor: pointer;
width: 70%;
border-radius: 20px;
font-size: 18px;
text-align: center;
}
a {
text-decoration: none;
font-size: 22px;
color: black;
}
a:hover,
button:hover {
opacity: 0.6;
}
No comments:
Post a Comment