Skip to content

Latest commit

 

History

History

28-Buttons or nav links with these awesome animation effects

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
author handle source date
Ajay Yadav 🎯
@ATechAjay
December 14, 2021 1:00 PM

ATechAjay Ajay Yadav 🎯 (@ATechAjay) - December 14, 2021 1:00 PM

💚Day 2️⃣8️⃣ / 1️⃣ 0️⃣0️⃣ days of Master in CSS Design series!

💥Today we going to design buttons or nav links with these awesome animation effects.

❓What's the main logic behind it with the codepen link?

#100DaysOfCode
[#webdev elopment](https://twitter.com/hashtag/webdevelopment)
#CodeNewbie
#webdev

Let me explain👇🧵 pic.twitter.com/KkO2dWKpSk

→ To create this border, we have to use 4 span tags.

→ This border has been made by combining all these elements.

1st span tag = top boder 2nd span tag = right boder 3rd span tag = bottom boder 4th span tag = left boder

👇 pic.twitter.com/WVgbpkUOQW

3_1470669281025085442

→ After that, we have to design the button according to our needs.

it's my requirement.

👇 pic.twitter.com/4ZBmS7n2VM

3_1470669753115054080

→ After that, all these span tags have to do positions like this.

👇 pic.twitter.com/78dh5Dchwy

3_1470673650869096451

3_1470674579735527428

→ For the "top" border:

  1. set width = 100%
  2. set height = 5px(for border width)
  3. position = absolute (relative in the button tag)

→ keyframes:

  1. set left (0-50%) = -100%
  2. now left (50-100%) = 100%

📌 The animation will start from the left and end on the right. pic.twitter.com/RYhdkSLXaj

3_1470673986497384449

→ For the "right" border:

  1. set width = 5px (for border width)
  2. set height = 100%

→ keyframes:

  1. set top (0-50%) = -100%
  2. now top (50-100%) = 100%

📌 The animation will start from the top and end on the bottom.

⛔Don't forget to set animation delay in each border. pic.twitter.com/pcNBGzqrXd

3_1470675886298914821

→ For the "bottom" border:

  1. set width = 100%
  2. set height = 5px (for border width)

→ keyframes:

  1. set right (0-50%) = -100%
  2. now right (50-100%) = 100%

📌 The animation will start from the right and end on the left. pic.twitter.com/jkHdZYGXkL

3_1470676374494978052

→ For the "left" border:

  1. set width = 5px (for border width)
  2. set height = 100%

→ keyframes:

  1. set bottom (0-50%) = -100%
  2. now bottom (50-100%) = 100%

📌 The animation will start from the bottom and end on the top. pic.twitter.com/VKaxhiA1pD

3_1470677112713400321

→ codepen link:

codepen.io/atechajay/pen/…

Thread link