Skip to content

Instantly share code, notes, and snippets.

@Eleeleth
Created April 7, 2015 17:26
Show Gist options
  • Save Eleeleth/3ee34f3092b8af45c513 to your computer and use it in GitHub Desktop.
Save Eleeleth/3ee34f3092b8af45c513 to your computer and use it in GitHub Desktop.
bNyjVY
<div class="wrapper">
<span class="close"></span>
</div>
body {
background: #333;
height: 100%;
}
div.wrapper {
background: #222;
height: 200px;
width: 200px;
position: relative;
left: 50%;
margin-left: -100px;
margin-top: 200px;
}
span.close {
margin-left: 5px;
margin-top: 5px;
cursor: pointer;
position: relative;
height: 30px;
width: 30px;
display: inline-block;
background: #333;
border: 1px solid #333;
border-radius: 100%;
}
span.close:before {
left: 50%;
content: '';
position: absolute;
border-left: 1px solid #fff;
transform: rotate(45deg);
height: 100%;
}
span.close:after {
left: 50%;
content: '';
position: absolute;
border-left: 1px solid #fff;
transform: rotate(135deg);
height: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment