Skip to content

Instantly share code, notes, and snippets.

@merriam
Created August 14, 2018 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save merriam/17d1fff98419d796fc6145aea35ff26c to your computer and use it in GitHub Desktop.
Save merriam/17d1fff98419d796fc6145aea35ff26c to your computer and use it in GitHub Desktop.
CSS before draws over body
<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