Skip to content

Instantly share code, notes, and snippets.

@Origame
Created December 3, 2016 08:16
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 Origame/ec8cde609031881109a7a03c595c7359 to your computer and use it in GitHub Desktop.
Save Origame/ec8cde609031881109a7a03c595c7359 to your computer and use it in GitHub Desktop.
Close cross CSS3
.pre-header .close{
position: absolute;
top: 25px;
right: 5px;
width: 30px;
height: 30px;
cursor: pointer;
}
.pre-header .close .cross{
background: #FFF;
height: 21px;
position: relative;
width: 2px;
display: block;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
margin: 5px 12px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.pre-header .close .cross::after {
background: #FFF;
content: "";
height: 2px;
left: -9px;
position: absolute;
top: 9px;
width: 21px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment