Last active
August 4, 2020 01:22
-
-
Save johnlewisdesign/e111a9a8d4952400dcea0ef49346e446 to your computer and use it in GitHub Desktop.
A close button X with a single div element
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
body{ | |
background:#333; | |
} | |
div{ | |
width:40px; | |
height:40px; | |
background-color:#333; | |
position:relative; | |
border-radius:6px; | |
box-shadow:2px 2px 4px 0 white; | |
} | |
div:before,div:after{ | |
content:''; | |
position:absolute; | |
width:36px; | |
height:4px; | |
background-color:white; | |
border-radius:2px; | |
top:16px; | |
box-shadow:0 0 2px 0 #ccc; | |
} | |
div:before{ | |
-webkit-transform:rotate(45deg); | |
-moz-transform:rotate(45deg); | |
transform:rotate(45deg); | |
left:2px; | |
} | |
div:after{ | |
-webkit-transform:rotate(-45deg); | |
-moz-transform:rotate(-45deg); | |
transform:rotate(-45deg); | |
right:2px; | |
} |
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></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment