A Pen by Marvin Mieth on CodePen.
Created
February 29, 2016 13:26
-
-
Save ntwcklng/e2c98f72d89c321e590d to your computer and use it in GitHub Desktop.
Medium Challenge 01 Solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="wrapper"> | |
<div class="heart"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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