How to create Awesome Link Hover Animation | HTML & CSS Project - Frontend everything 2022
Hello Everyone 👋 Welcome to My New Blog. Today I have made an Amazing Link Hover Animation with the help of HTML and CSS Only! 😍
I am Piyush, Sharing About Web development Daily. You can also check out me at @frontendeverything.
Before starting the blog, you might think about where you can use this project in real-life-based projects. So it's an Amazing Link Hover Animation that you can use in your own blog project. So it will look attractive.
Let's start making these amazing Link Hover Animation Using HTML & CSS step by step.
Video of the project,
So that was the preview now let us start making the project 😄 First, we will code HTML then CSS, and also I have shared codepen ink to make it easier for you.
HTML 🎈( step - 1)
In HTML we have used divs for containers.
<p>
Check out
<a href="#">
the link
<svg viewBox="0 0 70 36">
<path d="M6.9739 30.8153H63.0244C65.5269 30.8152 75.5358 -3.68471 35.4998 2.81531C-16.1598 11.2025 0.894099 33.9766 26.9922 34.3153C104.062 35.3153 54.5169 -6.68469 23.489 9.31527" />
</svg>
</a>
here
</p>
After the HTML we will design the Link Hover Animation with CSS..
Output till now
CSS🎈( step - 2)
html {
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
}
* {
box-sizing: inherit;
}
*:before, *:after {
box-sizing: inherit;
}
body {
min-height: 100vh;
display: flex;
font-family: "Inter", Arial;
justify-content: center;
align-items: center;
background: #F6F8FF;
}
:root {
--text: #2B3044;
--line: #BBC1E1;
--line-active: #275EFE;
}
p {
font-size: 18px;
margin: 0;
color: var(--text);
}
p a {
display: inline-block;
position: relative;
text-decoration: none;
color: inherit;
margin: 0 var(--spacing, 0px);
transition: margin 0.25s;
}
p a svg {
width: 76px;
height: 40px;
position: absolute;
left: 50%;
bottom: 0;
transform: translate(-50%, 7px) translateZ(0);
fill: none;
stroke: var(--stroke, var(--line));
stroke-linecap: round;
stroke-width: 2px;
stroke-dasharray: var(--offset, 69px) 278px;
stroke-dashoffset: 361px;
transition: stroke 0.25s ease var(--stroke-delay, 0s), stroke-dasharray 0.35s;
}
p a:hover {
--spacing: 4px;
--stroke: var(--line-active);
--stroke-delay: .1s;
--offset: 180px;
}
Now we have done the CSS coding as well, now we will see the final output and also check the codepen link mentioned below.
Final Output
The codepen link is here for making your work easier!
.
If you found any value in this blog you can support me by buying me a coffee.
.
.
.
.
.
Thank You For Scrolling Till here 😊. If You gain any knowledge then do checkout me at @frontendeverything. I am Piyush 🎉 I provide Content related to programming, technology, web development Daily.
.