Skip to content

Instantly share code, notes, and snippets.

@ntwcklng
Created February 29, 2016 13:26
Show Gist options
  • Save ntwcklng/e2c98f72d89c321e590d to your computer and use it in GitHub Desktop.
Save ntwcklng/e2c98f72d89c321e590d to your computer and use it in GitHub Desktop.
Medium Challenge 01 Solution
<div class="wrapper">
<div class="heart"></div>
</div>
.heart {
padding: 50px;
animation: heart-anim 1.1s ease-out infinite;
width: 50px;
height: 80px;
}
.heart:before, .heart:after {
width: 50px;
height: 80px;
background: red;
content: '';
display: block;
position: absolute;
border-radius: 50px 50px 0 0
}
.heart:before {
transform: translate(22px, 0) rotate(45deg)
}
.heart:after {
transform: rotate(-45deg)
}
@keyframes heart-anim {
0%, 30%, 70% {
transform: scale(1);
}
15%, 45% {
transform: scale(1.3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment