How to create a GRADIENT BORDER in CSS Tutorial

  Рет қаралды 35,861

Coding2GO

Coding2GO

Күн бұрын

👉 Get the best web hosting to deploy your websites: www.hostinger....
✌️ Use our discount code CODING2GO to get 10% off on all web hosting packages with a duration of 12 months or more
In this HTML and CSS Tutorial you will learn how to apply a gradient to a border and how to create a glow gradient hover effect with the box-shadow property. This modern CSS button design can be implemented on any website you want. Since it is not possible to use the linear-gradient() method on the border property or the box-shadow, we are going to use a ::after pseudo-element to create the gradient border.
👉 Get our HTML5 Course on Udemy: www.udemy.com/...
#webdevelopment #csshovereffect #csstutorial
Contents of this video:
How to create a gradient border in css
How to use the ::after pseudo-element in css
How to use the linear-gradient method in css
How to create a button hover effect
How to create a glow effect in css
How to apply a gradient to a shadow in css
👍 Like and Subscribe if you enjoyed the video 😉

Пікірлер: 60
@NisarFoodShow
@NisarFoodShow 9 ай бұрын
The work is awesome ❤ nice work bro❤
@sublimemmNoLink
@sublimemmNoLink Ай бұрын
Just FYI to everyone, magic numbering the width and height is a pretty bad solution and you would need different magic numbers for every button. If there is more text in the button it will be wider and give you more border on the x axis, so you'll have to lower your magic number. A much... much better approach is to use negative margin, button::after{ content: ''; position: absolute; inset: 0; margin: -0.2rem; border-radius: 1000px; background-image: linear-gradient(to bottom right, #008cff, #e100ff); z-index: -1; } this button will have the same border thickness, no matter how tall or wide the button is. instead of width and height of 100% btw, just use inset: 0, it means the same thing but is less code.
@sublimemmNoLink
@sublimemmNoLink Ай бұрын
also with inset: 0, you dont need to make the button a display flex or set the justify center or align items
@netheritecake
@netheritecake Ай бұрын
this is actually extremely helpful, thank you.
@SB-wn3gl
@SB-wn3gl 5 ай бұрын
I made gradient button in c++
@ginger8682
@ginger8682 4 ай бұрын
Thats a flex
@SB-wn3gl
@SB-wn3gl 4 ай бұрын
@@ginger8682 yes
@sanataniengineer4074
@sanataniengineer4074 4 ай бұрын
😂
@SB-wn3gl
@SB-wn3gl 4 ай бұрын
@@sanataniengineer4074 what ?
@over_kill
@over_kill 4 ай бұрын
YOU WHAA💀💀💀💀💀
@nicoborromeo1150
@nicoborromeo1150 24 күн бұрын
This was very helpful!
@j0hannes5
@j0hannes5 20 сағат бұрын
what if you wantet the contentof the button to have an opacity, but still have a linear gradient border?
@Adarsh-d4y8
@Adarsh-d4y8 9 күн бұрын
how do you able to make this types of css bro this is increadable plese let me know how do you these much proficiency in css
@ZAKI-ks1qj
@ZAKI-ks1qj 4 ай бұрын
3:08 can somebody explain when we set the z-index to zero in the hover part why the text wasn't covered by the pseudo element?
@alimansimov1929
@alimansimov1929 4 ай бұрын
I would like to know its why too
@xoy5
@xoy5 4 ай бұрын
rel
@stephanieapenas1734
@stephanieapenas1734 3 ай бұрын
I was having conflict with transform: translate(). After deleting it and using another method it was working
@serious_17
@serious_17 3 ай бұрын
@Programming-m5t when : :before or : : after pseudo-element is on top of the button it does not work as we expect it to, it does not hide the text inside of the button , the text always stay on top (I am only talking about the pseudo elements mentioned, I don't know how others work).
@idohan4513
@idohan4513 3 ай бұрын
stacking context
@anujchaurasia002
@anujchaurasia002 5 ай бұрын
Thanks for making this video 👍👍
@apkcricket2.0
@apkcricket2.0 3 ай бұрын
level ustad g
@IslamicReminder486
@IslamicReminder486 Ай бұрын
i did the same thing but it is not showing my border image why?
@Noname-wj7dw
@Noname-wj7dw Ай бұрын
Me too. I solved, maybe the button is on a navbar whit a “relative” position on the “absolute” position of the “after::button”. So, i solved by putting the navbar at z-index: 1 and leave the “after::button” at z-index -1.
@pyaephyo8108
@pyaephyo8108 4 ай бұрын
Thank Sir❤
@yamigamer1175
@yamigamer1175 3 ай бұрын
Can u use transition 0.5 or doesn't work
@spidysense7754
@spidysense7754 3 ай бұрын
Subscribed👍
@priyanshumalusare8257
@priyanshumalusare8257 4 ай бұрын
Very well explained
@mr.k_162
@mr.k_162 4 ай бұрын
How can we do transition with gradient?
@merictunc
@merictunc 4 ай бұрын
perfect explanation thx
@xa-27-animesh3
@xa-27-animesh3 3 ай бұрын
It would be really great if u could share the source code so that we can take a look at it
@ehabelbrolosy6877
@ehabelbrolosy6877 3 ай бұрын
nice work man
@oppenheim9406
@oppenheim9406 Ай бұрын
can u make it transparent ? i mean the bg transparent
@ndeyamienjie742
@ndeyamienjie742 Ай бұрын
it worked on my computer but not on my laptop,but still thx for the vid
@ripisdead8534
@ripisdead8534 Ай бұрын
why doing this when u can do border image?
@kaiuniversegames
@kaiuniversegames 10 ай бұрын
👌👌🔥🔥
@alimansimov1929
@alimansimov1929 4 ай бұрын
Very good keep going
@noumbissistael1470
@noumbissistael1470 4 ай бұрын
I didn't understand the z-index of 0 please But it's an awesome video
@TALOB123
@TALOB123 Ай бұрын
It's ezy
@TALOB123
@TALOB123 Ай бұрын
When ever you hover z index-1 will turn into z index- 0
@sublimemmNoLink
@sublimemmNoLink Ай бұрын
@@TALOB123 the z index of the button is already 0, in the video the z index of the PSEUDO element is set to -1. To noumbissistael's point, that is super confusing and why setting the index of the button to 0 is not explained at all in the video. The reason it works is probably because setting z index to any value creates a new stacking context, even though you're setting it from 0 to 0.
@josyafritudemedia551
@josyafritudemedia551 6 ай бұрын
Simple ✅✅🙏
@DevoAjit
@DevoAjit 2 ай бұрын
Done it 🎉
@ITSPHERE-ww6mi
@ITSPHERE-ww6mi 5 ай бұрын
thanks
@jeyceejeyka
@jeyceejeyka 5 ай бұрын
hey legs be friends in coding
@reanwithkimleng
@reanwithkimleng 3 ай бұрын
Moreeeee❤
@xoy5
@xoy5 4 ай бұрын
cool af
@AiExplainedd
@AiExplainedd Ай бұрын
thankyou
The border property you never knew you needed
14:25
Kevin Powell
Рет қаралды 100 М.
Fun ways to animate CSS gradients
14:00
Kevin Powell
Рет қаралды 248 М.
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 18 МЛН
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 5 МЛН
One day.. 🙌
00:33
Celine Dept
Рет қаралды 49 МЛН
Learn CSS Flexbox in 20 Minutes (Course)
20:37
Coding2GO
Рет қаралды 258 М.
Why I don't use flex-wrap anymore (and what to use instead)
6:05
Learn All Types of CSS Border Animations in Just 5 Minutes
4:38
Learn Flexbox CSS in 8 minutes
8:16
Slaying The Dragon
Рет қаралды 1,7 МЛН
Everything You Need To Know About CSS Gradients
10:10
Colt Steele
Рет қаралды 21 М.
Create an animated, glowing, gradient border with CSS
8:27
Kevin Powell
Рет қаралды 129 М.
TailwindCSS Animated Border Gradient (MIND BLOWING!)
9:48
Ariel Weinberger
Рет қаралды 16 М.
So, you want to build apps & websites?
9:34
Sajid
Рет қаралды 250 М.
Glowing Background Gradient Effects with Tailwind CSS
9:13
Tailwind Labs
Рет қаралды 93 М.
CSS Tips And Tricks I Wish I Knew Before
12:12
Lama Dev
Рет қаралды 492 М.
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 18 МЛН