Skip to content

Latest commit

 

History

History

11-Button with a gradient hover effect

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
author handle source date likes retweets replies
Ajay Yadav 🎯
@ATechAjay
November 27, 2021 7:03 AM
11
7
3

ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

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

💥Today we going to design a button with this awesome hover effect with gradient.

❓What is the main logic behind it?

#100DaysOfCode
#webdevelopment
#CodeNewbie

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

Tweet link


ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

✅ First of all, I'm going to design our anchor tag like this then we add a hover effect in it.

👇 pic.twitter.com/s5MCtzBT8d

3_1464420243283927046

Tweet link


ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

1️⃣ So, we have to add a span tag inside the anchor tag like this.

Here, tag is used to draw the left and right borders.

👇 pic.twitter.com/S2GIcKX4dd

3_1464418155019718658

Tweet link


ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

2️⃣ Then we have to design our anchor tag as required.

⛔ And don't forget to add overflow and position in the anchor tag element.

👇 pic.twitter.com/yUoo9boLqf

3_1464419419560448005

Tweet link


ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

3️⃣ Now, we have to use two pseudo-element for top and bottom borders.

And set the value of left and right.

👇 pic.twitter.com/n5z1DTqHrv

3_1464421600023891973

3_1464421600023900160

Tweet link


ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

4️⃣ And now when we hover on it then it comes to the initial position.

👇 pic.twitter.com/hWXp7cPncg

3_1464427672826617856

3_1464427672834957314

Tweet link


ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

5️⃣ Finally we have to set the values of left and right borders.

👇 pic.twitter.com/lkedaOqZ8Z

3_1464428606667440131

Tweet link


ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

6️⃣ Now when hover on it then it comes to it at the initial position.

✅That's all🥰

👇 pic.twitter.com/1U78ODNlfu

3_1464429108692062210

Tweet link


ATechAjay Ajay Yadav 🎯 (@ATechAjay) - November 27, 2021 7:03 AM

codepen.io/atechajay/pen/…

Tweet link