<ul class="menu">
<li>
<a href="#0">
About
<svg preserveAspectRatio="none" viewBox="0 0 546.714 178.143"><path d="M546.214 89.072c0 48.917-122.162 88.571-272.857 88.571C122.662 177.643.5 137.988.5 89.072.5 40.155 122.662.5 273.357.5c150.695 0 272.857 39.655 272.857 88.572z"/></svg>
</a>
</li>
<li>
<a href="#0">
Projects
<svg preserveAspectRatio="none" viewBox="0 0 546.714 178.143"><path d="M546.214 89.072c0 48.917-122.162 88.571-272.857 88.571C122.662 177.643.5 137.988.5 89.072.5 40.155 122.662.5 273.357.5c150.695 0 272.857 39.655 272.857 88.572z"/></svg>
</a>
</li>
<li>
<a href="#0">
Clients
<svg preserveAspectRatio="none" viewBox="0 0 546.714 178.143"><path d="M546.214 89.072c0 48.917-122.162 88.571-272.857 88.571C122.662 177.643.5 137.988.5 89.072.5 40.155 122.662.5 273.357.5c150.695 0 272.857 39.655 272.857 88.572z"/></svg>
</a>
</li>
<li>
<a href="#0">
Contact
<svg preserveAspectRatio="none" viewBox="0 0 546.714 178.143"><path d="M546.214 89.072c0 48.917-122.162 88.571-272.857 88.571C122.662 177.643.5 137.988.5 89.072.5 40.155 122.662.5 273.357.5c150.695 0 272.857 39.655 272.857 88.572z"/></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;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 120%;
height: 120%;
z-index: -1;
}
.menu a svg path {
fill: transparent;
stroke-width: 5px;
stroke: currentColor;
stroke-dasharray: 1210.709716796875;
stroke-dashoffset: -1210.709716796875;
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.