Created
August 14, 2018 06:53
-
-
Save merriam/17d1fff98419d796fc6145aea35ff26c to your computer and use it in GitHub Desktop.
CSS before draws over body
This file contains hidden or 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
<style> | |
.heart { | |
position: absolute; | |
margin: auto; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
background-color: pink; | |
height: 50px; | |
width: 50px; | |
} | |
.heart::before { | |
content: ""; | |
background-color: red; | |
border-radius: 50%; | |
position: absolute; | |
width: 50px; | |
height: 50px; | |
top: -25px; | |
left: 0px; | |
} | |
</style> | |
<div class = "heart"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment