Skip to content

Instantly share code, notes, and snippets.

@ryuran
Created August 26, 2015 09:10
Show Gist options
  • Save ryuran/b7ed19b350c972e6489f to your computer and use it in GitHub Desktop.
Save ryuran/b7ed19b350c972e6489f to your computer and use it in GitHub Desktop.
gpVyNb
<div>hover</div>
div {
position: relative;
padding: 10px;
margin: 10px;
display: inline-block;
&:before,
&:after {
content: '';
display: block;
position: absolute;
border: 1px solid transparent;
box-sizing: border-box;
height: 0;
width: 0;
transition: width 1s ease 0s, height 1s ease 1s;
}
&:before {
left: 0;
top: 0;
border-width: 1px 0 0 1px;
}
&:after {
right: 0;
bottom: 0;
border-width: 0 1px 1px 0;
}
&:hover {
color: red;
&:before,
&:after {
border-color: #000;
height: 100%;
width: 100%;
transition: width 1s ease 1s, height 1s ease 0s;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment