Skip to content

Instantly share code, notes, and snippets.

@femicodes
Created July 26, 2019 11:34
Show Gist options
  • Select an option

  • Save femicodes/c106e90bdec34a117eaff646a1b1da8f to your computer and use it in GitHub Desktop.

Select an option

Save femicodes/c106e90bdec34a117eaff646a1b1da8f to your computer and use it in GitHub Desktop.
[Mixpanel] blog card
<div class="card">
<img src="https://d1zjcuqflbd5k.cloudfront.net/files/acc_2397/VHm7?response-content-disposition=inline;%20filename=Untitled-1.png&Expires=1478892577&Signature=OSZ74PqFR7qczD4Jwh0uMDSfVy-1Qt73G5YNDPTOLKISlJYqrEd1vE6hjbXzG3u8~yp3g2uqQMBJ6aIdVVL~Dxf29qHQ3CyuRkjYhKwir~7Oxg2uejfD3bkI05ZSoKl7UOLF8nuW29ipnZ80HSxfGE8WkCuFEvBYSy8z5NKsEyA_&Key-Pair-Id=APKAJTEIOJM3LSMN33SA">
<div class="cardContent">
<h1>The Future of Product Analytics</h1>
<p>Join a discussion with Forrester, A16z and Mixpanel on the future of Product Analytics.</p>
<p class="learnMore">Learn more</p>
</div>
</div>
body {
height: 100vh;
}
h1 {
font-family: 'lato';
font-size: 19px;
color: #47495a;
margin:2rem 0 .3rem;
-webkit-font-smoothing: antialiased;
}
p {
font-family: 'lato';
font-size: 15px;
color: #6b7c93;
margin:0;
-webkit-font-smoothing: antialiased;
}
.card {
position: absolute;
top: 100px;
left: 100px;
width: 740px;
display: flex;
flex-direction: column;
background: #fff;
border-radius: 10px;
box-shadow: 0 15px 35px rgba(50,50,93,.1),0 5px 15px rgba(0,0,0,.04);
transition: all 0.2s ease;
overflow: hidden;
}
.card img {
width: 100%;
display: block;
transition: all 0.2s ease;
}
.cardContent {
display: flex;
flex-direction: column;
padding: 40px;
transition-property: transform;
transition: all 0.2s ease;
height: 94px;
}
.card:hover {
box-shadow: 0 25px 45px rgba(50,50,93,.1),0 12px 19px rgba(0,0,0,.06);
transform: translateY(-7px);
cursor: pointer;
}
.card:hover .cardContent {
height: 124px;
}
.learnMore {
opacity: 0;
transition: all 0.2s ease;
margin-top: 35px;
color: #1681dc;
font-weight: bold;
}
.card:hover .learnMore {
opacity: 1;
transform: translateY(-5px);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment