<div class="card transition">
<h2 class="transition">Heading here<br><small>description line here</small></h2>
<div class="cta-container transition"><a href="#" class="cta">Button</a></div>
<div class="card_circle transition"></div>
</div>
@import url(https://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic);
html,
body {
background-color: #eaeaea;
}
.transition {
transition: .3s cubic-bezier(.3, 0, 0, 1.3)
}
.card {
background-color: #fff;
height: 400px;
width: 300px;
position: absolute;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
overflow: hidden;
}
.card:hover {
box-shadow: 0px 30px 30px rgba(0,0,0,0.2);
height: 430px;
width: 330px;
}
.card_circle {
height: 400px;
width: 450px;
background: url(http://widewallpaper.info/wp-content/uploads/2015/11/Nature-HD-Wallpaper-1080p.jpg) no-repeat;
background-size: cover;
position: absolute;
border-radius: 50%;
margin-left: -75px;
margin-top: -270px;
}
.card:hover .card_circle {
border-radius: 0;
margin-top: -130px;
}
h2 {
text-align: center;
margin-top: 190px;
position: absolute;
z-index: 9999;
font-size: 26px;
color: #2196F3;
width: 100%;
font-family: 'Noto Sans', serif;
}
h2 small {
font-weight: normal;
font-size: 65%;
color: rgba(0,0,0,0.5);
}
.card:hover h2 {
margin-top: 100px;
color: #fff;
}
.card:hover h2 small {
color: #fff;
}
.cta-container {
text-align: center;
margin-top: 290px;
position: absolute;
z-index: 9999;
width: 100%;
font-family: 'Noto Sans', serif;
}
.cta {
color: #fff;
border: 2px solid #2196F3;
background-color: #2196F3;
padding: 10px 25px;
border-radius: 50px;
font-size: 17px;
text-decoration: none;
font-weight: bold;
}
.card:hover .cta-container {
margin-top: 320px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.