<ul class="menu">
<li>
<a href="#0">
About
<svg width="24" height="24"><path d="M11 2.206l-6.235 7.528-.765-.645 7.521-9 7.479 9-.764.646-6.236-7.53v21.884h-1v-21.883z"/></svg>
</a>
</li>
<li>
<a href="#0">
Projects
<svg width="24" height="24"><path d="M11 2.206l-6.235 7.528-.765-.645 7.521-9 7.479 9-.764.646-6.236-7.53v21.884h-1v-21.883z"/></svg>
</a>
</li>
<li>
<a href="#0">
Clients
<svg width="24" height="24"><path d="M11 2.206l-6.235 7.528-.765-.645 7.521-9 7.479 9-.764.646-6.236-7.53v21.884h-1v-21.883z"/></svg>
</a>
</li>
<li>
<a href="#0">
Contact
<svg width="24" height="24"><path d="M11 2.206l-6.235 7.528-.765-.645 7.521-9 7.479 9-.764.646-6.236-7.53v21.884h-1v-21.883z"/></svg>
</a>
</li>
</ul>
<footer class="page-footer">
<small>Made with <span>❤</span> by <a href="http://georgemartsoukos.com/" target="_blank">George Martsoukos</a>
</small>
</footer>
:root {
--body-bg-color: #1a1c1d;
--text-color: #aaaebc;
--red: #e74c3c;
}
ul {
list-style: none;
}
a {
color: inherit;
text-decoration: none;
}
body {
margin: 30px 0;
font: 22px sans-serif;
background: var(--body-bg-color);
color: var(--text-color);
}
.menu {
display: flex;
justify-content: center;
}
.menu li {
margin-right: 70px;
}
.menu a {
position: relative;
display: block;
padding: 10px;
}
.menu a svg {
position: absolute;
bottom: -20px;
left: 50%;
transform: translateX(-50%);
}
.menu a svg path {
fill: transparent;
stroke-width: 2px;
stroke: currentColor;
stroke-dasharray: 89.7506103515625;
stroke-dashoffset: -89.7506103515625;
transition: stroke-dashoffset 0.5s cubic-bezier(0.29, 0.68, 0.74, 1.02);
}
.menu a:hover svg path {
stroke-dashoffset: 0;
}
/* FOOTER
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.page-footer {
position: absolute;
bottom: 10px;
right: 10px;
font-size: 1rem;
}
.page-footer span {
color: var(--red);
}
const length = document.querySelector("li:nth-child(1) path").getTotalLength();
//console.log(length);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.