Skip to content

Instantly share code, notes, and snippets.

@mokhov
Created July 19, 2016 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mokhov/6f591d1291b71b8f379abace4f37d513 to your computer and use it in GitHub Desktop.
Save mokhov/6f591d1291b71b8f379abace4f37d513 to your computer and use it in GitHub Desktop.
Untitled
.cube {
position: absolute;
top: 50px;
left: 50px;
width: 20px;
height: 20px;
background: red;
transition: .3s opacity;
}
.cube:before {
position: absolute;
top: -10px; left: -10px;
right: -10px; bottom: -10px;
content: '';
background: black;
z-index: -1;
}
.cube:hover {
opacity: .5;
}
<div class="cube"></div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment