Last active
February 5, 2019 13:35
-
-
Save khoahuynhdev/fca745db694bffcfa43373df0751d2c9 to your computer and use it in GitHub Desktop.
Draw a little pink heart using html and css
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; | |
transform:rotate(-45deg) ; | |
} | |
.heart::after { | |
background-color: pink; | |
content: ""; | |
border-radius: 50%; | |
position: absolute; | |
width: 50px; | |
height: 50px; | |
top: 0px; | |
left: 25px; | |
} | |
.heart::before { | |
content: ""; | |
background-color: pink; | |
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
[email protected]