i want to make this arrow animation , i want to be centered and align the three lines that makes the arrow perfectly to make an arrow ,i want it to be smooth, i triad chat gpt and cluad ai ,YouTube but it didn’t work , also if there another way to do it tell me
the html:
<h1>👋 Hello World!</h1><!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Personal Portfolio</title>
</head>
<body>
<section class="navigation">
<nav class="navbar" id="navbar">
<ul>
<li><a class="nlink" href="#Welcome-section">Welcome</a></li>
<li><a class="nlink" href="#Projects">Projects</a> </li>
<li><a class="nlink" href="#info">info</a></li>
</ul>
</nav>
</section>
<section class="Welcome" id="welcome-section">
<h1 class="hero">Welcome</h1>
<div class="line-container">
<span class="line l1"></span>
<span class="line l2"></span>
<span class="line l3"></span>
</div>
</section>
</body>
</html>
the css:
*{
margin:0px;
padding: 0px;
box-sizing:border-box;
}
:root{
--line-color:white
}
html{
scroll-behavior:smooth;
}
/* navigation bar */
.navigation{
background-color: #FFD700;
position: fixed;
top: 0px;
left: 0px;
width: 100%;
margin: 0px;
padding: 0px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Adds a shadow below the navigation bar for a slight 3D effect */
z-index: 10;
}
.navbar ul{
display: flex;
list-style: none;
margin: 0px ;
padding: 10px;
margin-right: 10px;
font-size: 20px;
font-family: Arial, Helvetica, sans-serif;
justify-content: flex-end ;
}
.navbar li{
padding: 10px 0px ;
}
.navbar a {
text-decoration: none;
padding: 20px;
color: black;
}
.navbar a:hover {
background: #E6C200;
}
.Welcome{
padding-top: 60px;
background: linear-gradient(180deg,black , #4B0082 56%, black) ;
height: 100vh;
width: 100%;
color: white;
display: flex;
flex-direction: column;
justify-content: center; /* Center horizontally */
align-items: center; /* Center vertically */
text-align: center;
}
.Welcome h1{
font-size: 100px;position: absolute;
pointer-events: none;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}
.line-container {
position: relative;
width: 200px;
height: 200px;
margin-top: 200px;
overflow: hidden;
border: solid;
}
.line {
position: absolute;
background-color: var(--line-color);
border-radius: 50px;
}
.l1{
animation: drawLine 2s linear infinite;
width: 10px;
}
@keyframes drawLine {
0% {
height: 2px;
top: 50px;
}
50% {
height: 70px;
top: 50px;
}
100% {
height: 0px;
top: 120px;}
}
.l2{
transform-origin: top left;
animation: drawAndEraseDiagonal 2s linear infinite;
height: 10px;
transform: rotate(45deg);
}
@keyframes drawAndEraseDiagonal {
0% {
width: 2px;
top: 90px;
left: 80px;
}
50% {
width: 40px;
top: 90px;
left: 80px;
}
100% {
width: 2px;
top: 115px;
left: 100px;
}
}
.l3{
transform-origin: top right;
animation: drawAndEraseDiagonal1 2s linear infinite;
height: 10px;
transform: rotate(-45deg);
}
@keyframes drawAndEraseDiagonal1 {
0% {
width: 2px;
top: 90px;
right: 70px;
}
50% {
width: 40px;
top: 90px;
right: 70px;
}
100% {
width: 2px;
top: 115px;
right: 90px;
}
}
i want the three lines to align perfectly and in the middle,also i used the border of the lines container as reference but now if i remove it all of the lines draft from their position