Skip to content

Instantly share code, notes, and snippets.

@kannankumar
Last active August 29, 2015 13:57
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 kannankumar/9887737 to your computer and use it in GitHub Desktop.
Save kannankumar/9887737 to your computer and use it in GitHub Desktop.
Etched Border Effect
.blue{background-color:#4A7496;}
.green{background-color:#49796B;}
.grey{background-color:#888}
.etched{
width:50px;
height:50px;
border-top:1px solid rgba(0,0,0,0.2);
border-bottom:1px solid rgba(0,0,0,0.2);
position:relative;
box-shadow:1px 1px 2px -1px #000;
}
.etched:nth-child(n+2){
border-top:0;
}
.etched:after{
content:'';
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
z-index:1000;
border-radius:0;
border-top:1px solid rgba(255,255,255,0.1);
}
.etched:hover:after{
background-color:rgba(255,255,255,0.1);
}
<div class="etched blue"></div>
<div class="etched blue"></div>
<div class="etched grey"></div>
<div class="etched blue"></div>
<div class="etched green"></div>
// alert('Hello world!');
{"view":"separate","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