HTML CSS Beautiful CARDS
Project Last View:
Copy This Code HTML:
<div class="card">
<div class="content">
<div class="post main">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
<div class="detail"></div>
<div class="details"></div>
<div class="details"></div>
</div>
<div class="post sec">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
</div>
<div class="post sec">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
</div>
<div class="post ter">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
</div>
<div class="post ter">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
</div>
<div class="post ter">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
</div>
<div class="post ter">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
</div>
<div class="post ter">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
</div>
<div class="post ter">
<div class="preview"></div>
<div class="counter"></div>
<div class="detail"></div>
</div>
</div>
<div class="fabs">
<div class="fab"></div>
<i class="avatar zmdi zmdi-account"></i>
</div>
<div class="user">
<div class="socials">
<div class="social"><i class="zmdi zmdi-twitter"></i></div>
<div class="social"><i class="zmdi zmdi-github"></i></div>
<div class="social"><i class="zmdi zmdi-google-plus"></i></div>
<div class="social"><i class="zmdi zmdi-codepen"></i></div>
</div>
<div class="profiles">
<div class="profile"><span>51</span>Upvoted</div>
<div class="profile"><span>9</span>Created</div>
<div class="profile"><span>9</span>Showcased</div>
<div class="profile"><span>1</span>Collections</div>
<div class="profile"><span>2</span>Followers</div>
<div class="profile"><span>5</span>Following</div>
</div>
</div>
</div>
Copy This CSS Code
@import url(https://zavoloklom.github.io/material-design-iconic-font/css/docs.md-iconic-font.min.css);
body {
background: #64b5f6;
text-align: center;
}
.card {
height: 400px;
width: 300px;
background: #fff;
font-family: Roboto;
display: block;
position: relative;
margin: 50px auto;
border-radius: 5px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
transition: all 0.2s ease-in-out;
}
.card:hover {
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}
.fab {
position: absolute;
width: 60px;
height: 60px;
margin-top: 0;
margin-left: 50px;
visibility: hidden;
background-color: #ffd54f;
border-radius: 50%;
transform: scale(0);
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.24);
transition: margin-top 0.6s 0.0s ease-in-out, margin-left 0.6s 0.1s ease-in-out, transform 0.6s 0.0s ease-in-out, visibility 0.6s ease-in-out;
}
.active .fab {
margin-top: 50px;
margin-left: 120px;
transform: scale(12);
visibility: visible;
transition: margin-top 0.5s ease-in-out, margin-left 0.6s ease-in-out, transform 0.4s 0.3s ease-in-out, visibility 0.4s ease-in-out;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}
.avatar {
margin-top: 5px;
margin-left: -30px;
width: 60px;
height: 60px;
font-size:2em;
line-height:60px;
color: #37474f;
border-radius: 50%;
background-color: #ffd54f;
position: absolute;
transition: 0.6s ease-in-out;
cursor: pointer;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}
.active .avatar {
transform: scale(2);
margin-top: 50px;
margin-left: -30px;
transition: 0.6s ease-in-out;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}
.active .avatar:hover {
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}
.fabs {
position: absolute;
margin-top: -30px;
margin-left: 260px;
overflow: hidden;
width: 80px;
height: 80px;
border-radius: 5px;
transition: 1s ease-in-out;
border-radius: 50%;
}
.active .fabs {
margin-top: 0px;
margin-left: 0px;
width: 300px;
height: 400px;
transition: 0.4s ease-in-out;
border-radius: 0;
}
.content {
position: absolute;
width: 280px;
height: 380px;
margin: 10px;
text-align: center;
overflow-y: auto;
transition: 0.5s 0.3s cubic-bezier(.55, 0, .1, 1);
}
.active .content {
transform: scale(0.2);
opacity: 0;
transition: 0.2s 0.3s cubic-bezier(.55, 0, .1, 1);
}
.post {
position: relative;
display: inline-block;
height: 100px;
margin: 10px auto 0;
background: #eceff1;
border-radius: 3px;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
transition: all 0.2s ease-in-out;
}
.post:hover{
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.counter {
border-radius: 50%;
background: #3E50B4;
cursor: pointer;
}
.detail {
border: 1px solid #607d8b;
}
.main {
width: 99%;
height: 130px;
}
.main>.preview {
width: 50%;
height: 100%;
background: #ef5350;
}
.main>.counter {
width: 40px;
height: 40px;
margin-left: 220px;
margin-top: -120px;
}
.main>.detail{
width:50px;
margin-top: -10px;
margin-left: 150px;
}
.main>.details{
border: 1px solid #607d8b;
width:100px;
margin-top: 30px;
margin-left: 150px;
}
.sec {
width: 49%;
}
.sec>.preview {
width: 100%;
height: 70%;
background: #42a5f5;
}
.sec>.counter {
width: 20px;
height: 20px;
margin-left: 110px;
margin-top: -10px;
}
.sec>.detail{
width:50px;
margin-left: 10px;
}
.ter {
width: 32%;
}
.ter>.preview {
width: 100%;
height: 80%;
background: #d4e157;
}
.ter>.counter {
width: 15px;
height: 15px;
margin-left: 65px;
margin-top: -7px;
}
.ter>.detail{
width:40px;
margin-left: 10px;
}
.user {
position: absolute;
width: 280px;
height: 200px;
margin: 150px 10px 0 10px;
text-align: center;
visibility: hidden;
transition: 0.5s cubic-bezier(.55, 0, .1, 1);
}
.active .user {
visibility: visible;
}
.socials {
display: inline-block;
}
.social {
width: 40px;
height: 40px;
border-radius: 50%;
transform: translate(0px, -10px);
opacity: 0;
float: left;
margin: 0 auto;
overflow: hidden;
z-index: 2;
transition: 0.2s cubic-bezier(.55, 0, .1, 1);
cursor: pointer;
}
.social>i {
line-height: 40px;
font-size: 2em;
color: #37474f;
}
.active .social {
transform: translate(0px, 0px);
opacity: 1;
transition: 0.3s 0.5s cubic-bezier(.55, 0, .1, 1);
}
.profiles {
display: inline-block;
}
.profile {
width: 50%;
height: auto;
transform: translate(0px, -10px);
opacity: 0;
float: left;
margin: 0 auto;
overflow: hidden;
z-index: 2;
transition: 0.2s cubic-bezier(.55, 0, .1, 1);
color: #37474f;
}
.profile>span {
line-height: 40px;
font-size: 1.2em;
font-weight: 600;
display: block;
font-style: none;
color: #37474f;
}
.active .profile {
transform: translate(0px, 0px);
opacity: 1;
transition: 0.3s 0.8s cubic-bezier(.55, 0, .1, 1);
}
/* Ripple */
.ink {
display: block;
position: absolute;
background: rgba(38, 50, 56, 0.4);
border-radius: 100%;
-moz-transform: scale(0);
-ms-transform: scale(0);
webkit-transform: scale(0);
transform: scale(0);
}
/*animation effect*/
.ink.animate {
animation: ripple 0.5s ease-in-out;
}
@keyframes ripple {
/*scale the element to 250% to safely cover the entire link and fade it out*/
100% {
opacity: 0;
-moz-transform: scale(5);
-ms-transform: scale(5);
webkit-transform: scale(5);
transform: scale(5);
}
}
/*Scrollbar*/
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
border-radius: 0;
}
::-webkit-scrollbar-thumb {
margin: 2px;
border-radius: 10px;
background: rgba(0, 0, 0, 0.2);
}
COPY THIS JS CODE
$('.avatar').click(function(e) { $('.card').toggleClass('active'); }); // Ripple effect var target, ink, d, x, y; $(".social").click(function(e) { target = $(this); //create .ink element if it doesn't exist if (target.find(".ink").length === 0) target.prepend("<span class='ink'></span>"); ink = target.find(".ink"); //incase of quick double clicks stop the previous animation ink.removeClass("animate"); //set size of .ink if (!ink.height() && !ink.width()) { //use parent's width or height whichever is larger for the diameter to make a circle which can cover the entire element. d = Math.max(target.outerWidth(), target.outerHeight()); ink.css({ height: d, width: d }); } //get click coordinates //logic = click coordinates relative to page - parent's position relative to page - half of self height/width to make it controllable from the center; x = e.pageX - target.offset().left - ink.width() / 2; y = e.pageY - target.offset().top - ink.height() / 2; //set the position and add class .animate ink.css({ top: y + 'px', left: x + 'px' }).addClass("animate"); });
Thank You For Visiting Amaos3
Team Amaos3
Other Use Full Articles:
0 Comments