Can someone help me figure out why the animation for the hr tag is not working as intended? I'm trying to make it animate from left to right, repeat, and stay centered under the h2 tag.
.div-projects {
margin-top: 200px;
display: flex;
justify-content: center;
align-items: center;
}
.div-projects h2 {
font-size: 55px;
padding: 90px;
color: white;
transform: skewY(-9deg);
}
.hr-projects {
width: 20%;
border-radius: 30px;
z-index: 2;
left: 900px;
bottom: 60px;
transform: skewY(-6deg);
border: 3px solid rgba(0, 136, 169, 1);
position: relative;
animation: alternate hr 19s infinite;
}
@keyframes hr {
from {
left: 900px;
}
to {
right: 600px;
}
}
<div class="div-projects">
<h2>Projects</h2>
</div>
<hr class="hr-projects">