Created
August 4, 2020 01:20
-
-
Save johnlewisdesign/b96ffeb1e77d32a0588a20b7d6884f33 to your computer and use it in GitHub Desktop.
Creates a close button X in pure CSS
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
<span class="close-x"></span> | |
<style> | |
.close-x { | |
display: inline-block; | |
width: 20px; | |
height: 20px; | |
border: 7px solid #f56b00; | |
background: | |
linear-gradient(45deg, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 43%,#fff 45%,#fff 55%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 100%), | |
linear-gradient(135deg, #f56b00 0%,#f56b00 43%,#fff 45%,#fff 55%,#f56b00 57%,#f56b00 100%); | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment