.container
.link #[.text Home]
.link #[.text Projects]
.link #[.text Art]
.link #[.text Social]
.link #[.text Setup]
.link #[.text Help]
View Compiled
html, body{
padding:0px;
margin:0px;
font-family: 'Raleway', sans-serif;
color:#FFF;
height:100%;
}
body{
background:rgba(0, 0, 0, 0.5);
}
.container{
max-width:200px;
background:rgba(0, 0, 0, 0.75);
margin:40px auto;
padding:10px 0px 20px 0px;
border:1px solid #111;
border-radius:4px;
box-shadow:0px 4px 5px rgba(0, 0, 0, 0.75);
}
.link{
font-size:16px;
font-weight:300;
text-align:center;
position:relative;
height:40px;
line-height:40px;
margin-top:10px;
overflow:hidden;
width:90%;
margin-left:5%;
cursor:pointer;
}
.link:after{
content: '';
position:absolute;
width:80%;
border-bottom:1px solid rgba(255, 255, 255, 0.5);
bottom:50%;
left:-100%;
transition-delay: all 0.5s;
transition: all 0.5s;
}
.link:hover:after,
.link.hover:after{
left:100%;
}
.link .text{
text-shadow:0px -40px 0px rgba(255, 255, 255, 1);
transition:all 0.75s;
transform:translateY(100%) translateZ(0);
transition-delay:all 0.25s;
}
.link:hover .text,
.link.hover .text{
text-shadow:0px -40px 0px rgba(255, 255, 255, 0);
transform:translateY(0%) translateZ(0) scale(1.1);
font-weight:600;
}
//For Demo only
var links = document.getElementsByClassName('link')
for(var i = 0; i <= links.length; i++)
addClass(i)
function addClass(id){
setTimeout(function(){
if(id > 0) links[id-1].classList.remove('hover')
links[id].classList.add('hover')
}, id*750)
}
This Pen doesn't use any external JavaScript resources.