- var myList = ['Home', 'About', 'Services', 'Team', 'Portifilio', 'Content']
ul
each val in myList
li
a(href='#')= val
View Compiled
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: sans-serif
}
ul {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
li {
list-style: none;
a {
position: relative;
display: block;
text-transform: uppercase;
margin: 20px 0;
padding: 10px 20px;
text-decoration: none;
color: #262626;
font-family: sans-serif;
font-size: 18px;
font-weight: 600;
transition: .5s;
z-index: 1;
&:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-top: 2px solid #262626;
border-bottom: 2px solid #262626;
transform: scaleY(2);
opacity: 0;
transition: .3s;
}
&:after {
content: '';
position: absolute;
top: 2px;
left: 0;
width: 100%;
height: 100%;
background-color: #262626;
transform: scale(0);
opacity: 0;
transition: .3s;
z-index: -1;
}
&:hover {
color: #fff;
&:before {
transform: scaleY(1);
opacity: 1;
}
&:after {
transform: scaleY(1);
opacity: 1;
}
}
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.