<div class="product">
<img class="mattress" src="https://res.cloudinary.com/dboztnq7k/image/upload/v1484647571/mattress_faprcd.png" />
<div class="copy">
<h4>Lorem Ipsum 6500</h4>
<p>ab 450,00 €</p>
</div>
<a class="cta" href="#">Zum Produkt</a>
</div>
@import url(https://fonts.googleapis.com/css?family=Nunito");
html {
height:100%;
}
body {
min-height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.product {
cursor:pointer;
position:relative;
height:275px;
z-index:1;
}
.product:before {
content: ' ';
display:block;
width:440px;
height:180px;
position:absolute;
left:-40px;
top:-20px;
background: linear-gradient(to right, #5f7ad5, #914fff);
z-index:-1;
transition: all 0.5s ease-in-out;
}
.mattress {
margin-top:0;
transition: all 0.5s ease-in-out;
position:relative;
z-index:1;
}
.product:hover .mattress {
margin-top:-16px;
}
.product:after {
content:' ';
display:block;
height:271px;
width:383px;
position:absolute;
top: 3px;
left: 0;
background-image: url('https://res.cloudinary.com/dboztnq7k/image/upload/v1484647570/shadow_ym0vvb.png');
background-size: 100% 100%;
background-repeat: no-repeat;
z-index:0;
opacity:.8;
transition: all 0.5s ease-in-out;
}
.product:hover:after {
top:10px;
left:2%;
background-size: 97% 97%;
opacity:0.35;
}
.product:hover:before {
height:325px;
}
.copy {
position:absolute;
top:230px;
left:0;
font-family: "Nunito", sans-serif;
color:#243F81;
transition: all 0.5s ease-in-out;
}
.copy p, .copy h4 {
margin:0;
}
.product:hover .copy {
color:#fff;
}
.cta {
opacity:0;
position:absolute;
top:230px;
right:15px;
background-color: #fff;
color: #243F81;
border-radius: 50px;
padding: 12px 48px;
font-family: 'Nunito', sans-serif;
font-size: 16px;
font-weight: 200;
text-decoration: none;
box-shadow: 0 16px 32px 0 rgba(0, 40, 120, .35);
transition: all 0.7s ease;
}
.cta:hover {
box-shadow: 0 0px 0px 0 rgba(0, 40, 120, 0);
background-color: #243F81;
color: #fff;
}
.product:hover .cta {
opacity:1;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.