No video

Fun ways to animate CSS gradients

  Рет қаралды 242,633

Kevin Powell

Kevin Powell

Күн бұрын

Keep up to date on my Learn Responsive Web Design course - www.kevinpowell.co/learn-resp...
Gradients are background-images, so we can't set up a transition on that property. It's one of the ones we simply cannot animate with CSS.
Luckily, we can animate background-position, so combining that with background-size, we can do some fun stuff with our gradients, such as a hover effect for buttons, having the body of our page animate, as well as setting up a gradient in some text.
See the code on CodePen: codepen.io/kevinpowell/pen/Eq...
#css #gradients #animation
---
Come and hangout, ask questions, suggest ideas, and meet some awesome people over in The Community: / discord
I have a newsletter! www.kevinpowell.co/newsletter
I've been working on some courses! Find out more: www.kevinpowell.co/courses
---
My Code Editor: VS Code - code.visualstudio.com/
How my browser refreshes when I save: • How to automatically r...
---
Support me on Patreon: / kevinpowell
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my KZbin channel, make sure to follow me on Instagram and Twitter.
Instagram: / kevinpowell.co
Twitter: / kevinjpowell
Codepen: codepen.io/kevinpowell/
Github: github.com/kevin-powell

Пікірлер: 210
@thegrantkennedy
@thegrantkennedy 5 жыл бұрын
I’m so glad I found your channel. Your CSS stuff is great.
@crasymagic
@crasymagic 5 жыл бұрын
Background clip is reaaaaaally interesting, thanks a lot
@Pspisripoff
@Pspisripoff 4 жыл бұрын
Doesnt work for me :0
@nicogorr8440
@nicogorr8440 4 жыл бұрын
@@Pspisripoff You need to add the "-webkit-" prefix. -webkit-background-clip: text;
@SoberStones
@SoberStones 3 жыл бұрын
@@nicogorr8440 thank you - I was having the same problem!
@creativityexpeditions4582
@creativityexpeditions4582 Жыл бұрын
​@@nicogorr8440 Thank you so much. But he didn't use this in the video but his one worked....how?
@odytimesthree
@odytimesthree 4 жыл бұрын
Dude, I get super blazed and watch your videos and I learn so much while being entertained. This is some really good stuff, man.
@afsanazamannipa7711
@afsanazamannipa7711 5 жыл бұрын
You did an amazing video using a simple CSS property. This surely will give a lot of ideas to implement in building an eye-catching website.
@fonncatalina6464
@fonncatalina6464 3 жыл бұрын
Watching your videos is like sitting on couch and having comfort food, soooo satisfying! Thank you so much ! You are my life saver!
@AmandaLucaseu
@AmandaLucaseu 5 жыл бұрын
Love the tutorial - so glad I jumped on your new course 👏🏻
@joeldcanfield_spinhead
@joeldcanfield_spinhead 5 жыл бұрын
I appreciate that you include some design sensibilities in your videos. This shifting gradient background is a good fit for some bits of my current site rebuild. Much fun.
@KevinPowell
@KevinPowell 5 жыл бұрын
Glad that you like the designy stuff I do too, and glad that I could help with something that you can use on your site :D
@bomajoseph8240
@bomajoseph8240 Жыл бұрын
“Design sensibilities.” Extracted the word from my mouth👍
@Fiveleafclover180
@Fiveleafclover180 3 жыл бұрын
Your Scrimba courses are a god-send! Thank you for doing them.
@brentmakes
@brentmakes 2 жыл бұрын
I love your videos! I am a 40-something year-old student who once did web design in the early years of the Browser Wars. I'm taking classes to get back into it now, and watching your videos helps me a ton. It's usually the little things, like reminding us that we should put a cursor: pointer; on a text link styled as a button that make me pause the video and go update my current project :) I also love your CSS Battles and I've started doing them for practice.
@bumbleguppy
@bumbleguppy Жыл бұрын
Ha! yeah, I remember back in that day I wrote a script that would take an element and a couple colors, wrap each letter in a span and with timers animate a gradient. It totally PEGGED the browser. This technique here is so easy and smooth and easy to implement :)
@aidenefaz9865
@aidenefaz9865 Ай бұрын
This video is a whole package about gradients. Covered every usecases nicely.
@gbdaeye
@gbdaeye 4 жыл бұрын
I love your channel. Thank you for sharing this cool stuff that has lots of potential for new approaches to making websites.
@donghuuhieu137
@donghuuhieu137 4 жыл бұрын
my mind blowed it out, thanks for this amazing ideal
@timothyogrady2560
@timothyogrady2560 4 жыл бұрын
Awesome video Kevin. Found some pretty cool ways to use this for a project I'm working on.
@termited0
@termited0 2 жыл бұрын
It occurred to me the day after I watched this video that this gradient trick can be used to create a loading placeholder. Gonna try it! Thanks for great content!
@Nadia-wu9hk
@Nadia-wu9hk 3 жыл бұрын
I love this CSS gradients, thank you!!
@ruteshimizu3403
@ruteshimizu3403 9 ай бұрын
As someone who has vary little knowledge in CSS, you helped me a lot creating a cool page! Thank you!
@scorepro5059
@scorepro5059 5 жыл бұрын
Clipping background image to the text, very cool.
@Mophet
@Mophet 5 жыл бұрын
Recently I wanted to make a subtle light-reflection run over a button at :hover... :))) that’s it! Thanks!
@zubairspov
@zubairspov 5 жыл бұрын
Wow, cool work around on the transitions
@rwmedia9847
@rwmedia9847 3 жыл бұрын
I can click wherever on your channel and still learn something. Fun is good (actually great) too. Thank You.
@iamtafara
@iamtafara 5 жыл бұрын
Great tut as usual,,, thanx kev
@blonduose
@blonduose 4 жыл бұрын
When I started to learn programming I started with JS, then decided on the web dev path. I though HTML and CSS were a bit boring, until I came to your videos....yesterday! It shows how prejudiced one can be towards something one doesn't know very well. Look forward to learning new stuff and styling my projects ! Tank you so much
@KevinPowell
@KevinPowell 4 жыл бұрын
So glad that I've shown you that HTML & CSS can be fun! You just made my day :D
@prontocreative2374
@prontocreative2374 3 жыл бұрын
That is unbelievably clever ! .... hats off
@MartinLangenberg
@MartinLangenberg 5 жыл бұрын
Nice video once again! I have used gradients on buttons combined with a ::before or::after for a smooth transition between states. Did not know about background-clip. That is a cool trick. Keep up the good videos
@MartinLangenberg
@MartinLangenberg 5 жыл бұрын
@d3kra X why do you think that?
@ShadiMuhammad
@ShadiMuhammad 5 жыл бұрын
You are always GREAT Kev. 👌 Keep doing these amazing videos. ✌
@LH-gb2lh
@LH-gb2lh 3 ай бұрын
Wow! So easy! Thanks!
@gcecg
@gcecg 3 жыл бұрын
Very cool effects! And easy to accomplish.
@Shrinehi1
@Shrinehi1 5 жыл бұрын
Very cool! Thanks!
@shvideo1
@shvideo1 4 жыл бұрын
It's like three tutorials in one, all very useful and interesting. Great job. Thank you.
@Eternal_Otter
@Eternal_Otter 3 жыл бұрын
I'm not a web developer but the first thing in mind for me was a kind of color wheel that would rotate forever 360 degrees. But a smart idea for just moving the picture left to right :)
@LanFeusT23
@LanFeusT23 5 жыл бұрын
Great little trick! Love this!
@tobskii1040
@tobskii1040 3 жыл бұрын
That's amazing. Thanks
@rohil3023
@rohil3023 5 жыл бұрын
This is really amazing!! thanks a lot, I wanted to change my button in one of my projects whenever a user hovers but I didn't really know how this will help me a ton 😁 cheers
@KevinPowell
@KevinPowell 5 жыл бұрын
Happy I could help 😁
@deniskotov
@deniskotov 3 жыл бұрын
Cool tricks, thx a lot!
@brainztain
@brainztain 4 жыл бұрын
"people are going to hate your website if you have too many fast transitions" *Puts transitions cycling at 1 sec on txt, background, and borders 🤪
@Kanibulus
@Kanibulus 3 жыл бұрын
(*Φ皿Φ*)
@BenRogersWPG
@BenRogersWPG 3 жыл бұрын
This is amazing
@anatolisimeonov1270
@anatolisimeonov1270 Жыл бұрын
That is a very cool way to do transition for bg-img 🙌🏼(bg-position)
@rameenana
@rameenana Жыл бұрын
Thanks man. This was very helpful.
@canapz6370
@canapz6370 5 жыл бұрын
One of best part to learn css in beginners
@Isabela-pj3bz
@Isabela-pj3bz 4 жыл бұрын
One more fan here. Thanks, great video.
@zakariyaabaouali6904
@zakariyaabaouali6904 2 жыл бұрын
this amazing of amazing nice work thank you so mush
@dave6012
@dave6012 3 жыл бұрын
I have used a repeating linear gradient to create a lined paper effect. It was neato-burrito.
@georgeliss4015
@georgeliss4015 5 жыл бұрын
personally, I'm not a fan of instagram-style gradients, but it gave some other ideas...
@sougataghar1179
@sougataghar1179 5 жыл бұрын
i was hoping that i could learn to transition gradients but thats a heartbreak .nice video tho :DDD
@travezripley
@travezripley 5 жыл бұрын
Kevin!!! You’re a beast!!
@jaynews9495
@jaynews9495 3 жыл бұрын
maybe you could use the :active pseudo class to get that button animation to make sense on mobile? you could set :hover to have some more innocent effect, like transitioning to slightly bigger button size, or underlining the text or something, and then the animation is reserved for the :focus and :active states.
@akashrajum3319
@akashrajum3319 4 жыл бұрын
Amazing content, thank you.
@VivekYadav-up7uu
@VivekYadav-up7uu Жыл бұрын
this tutorial is amazing
@burnblue
@burnblue 5 жыл бұрын
Clearest you've done
@henr2000
@henr2000 Жыл бұрын
thanks very nice tutorial!
@ione7260
@ione7260 3 жыл бұрын
NICE one its helping a lot
@KevinPowell
@KevinPowell 3 жыл бұрын
Thanks! 😃
@aliturab5370
@aliturab5370 2 жыл бұрын
dude you really are a fricking genius
@martinvfarago
@martinvfarago 4 жыл бұрын
Thank you!
@ales_wth_629
@ales_wth_629 Ай бұрын
AMAZING, you are awesome
5 жыл бұрын
this is really nice
@maxmuller9871
@maxmuller9871 4 жыл бұрын
Thank you so much nice video!
@icekangg
@icekangg 3 жыл бұрын
cool, thanks
@timjobs9072
@timjobs9072 5 жыл бұрын
thank you give me inspirations👍👍👍, good videos
@atouchofa.d.d.5852
@atouchofa.d.d.5852 3 жыл бұрын
Love these!
@ahmedalhallag3338
@ahmedalhallag3338 3 жыл бұрын
What a great teacher!
@nadicadizdarevic2835
@nadicadizdarevic2835 2 жыл бұрын
Thanks !
@DumbSkippy
@DumbSkippy 3 жыл бұрын
Hi Kevin, G'Day from West Australia. Gread video. I like your style of presentation. Way to go, Canada! Thank you !
@prajwalpimpalte7684
@prajwalpimpalte7684 4 ай бұрын
Amazing!!
@JacoblBroughton
@JacoblBroughton 4 жыл бұрын
Really helpful video thanks man
@AndyInTheUK
@AndyInTheUK 2 жыл бұрын
That is sooooo coooool!
@fernandocremonezcosta1278
@fernandocremonezcosta1278 3 жыл бұрын
Amazing content!
@zaye_d
@zaye_d 5 жыл бұрын
I love you because i love web design stuff's
@WORDGASM
@WORDGASM 4 жыл бұрын
Thanks, teacher!
@prontocreative2374
@prontocreative2374 3 жыл бұрын
you had me at 'Quacker'
@lasersmartrus
@lasersmartrus 2 жыл бұрын
Amazing!)
@sdKA_garia
@sdKA_garia 4 жыл бұрын
amazing 👏🏻👏🏻👏🏻
@SamuelChinzah17
@SamuelChinzah17 2 жыл бұрын
Very Cool 👍
@DustinHein
@DustinHein 3 жыл бұрын
inspiring!
@erdemm35tr
@erdemm35tr 3 жыл бұрын
Hey Kevin, i was playing with that background gradient color and i wanted to ask a question: Do you think is it possible to do that while having an actual image on the background? When we change the background size to 400% for example i lose the feature of background size: cover to photo
@VasudeoJha
@VasudeoJha Күн бұрын
great fun
@iamtharunraj
@iamtharunraj Жыл бұрын
I'm 3 years late. But, this topic was extremely fun! Thanks a lot Kevin!
@GiancarloCarccamo
@GiancarloCarccamo 2 жыл бұрын
great video
@in2fractalout
@in2fractalout 3 жыл бұрын
awesome!!1
@JM-jk9vz
@JM-jk9vz Жыл бұрын
I'm subscribing just because of 9:27.
@jackcollazo
@jackcollazo 4 жыл бұрын
ok, I'm impressed ... and subscribed.
@KevinPowell
@KevinPowell 4 жыл бұрын
Welcome aboard!
@nickbrown6754
@nickbrown6754 3 жыл бұрын
background-clip looks fun and interesting 🤔
@roninsvideos
@roninsvideos 2 жыл бұрын
Love your videos Kevin. You are the best CSS teacher out there. But I would love to know... Kev, were you drinking before this video? lol. I think you were. lol. Glad you are having fun. Thank you for all the great videos!
@lucasferrero123
@lucasferrero123 4 жыл бұрын
Great video Kevin. I've found that the background-clip:text does not work on chrome, so I've used the @supports at rule to give browsers that don't support this feature yet another styling.
@Fiveleafclover180
@Fiveleafclover180 3 жыл бұрын
Thank you! I was wondering why my text was not going transparent; I was using a chrome browser.
@bobrobertsNotUrBob
@bobrobertsNotUrBob 3 жыл бұрын
you could also filter hue rotate animate
@cptechno
@cptechno 3 жыл бұрын
Can you put gradient background coloring on your favourite(s) data-grid components to give a bit of 3D effect? The point of my quesiton is to find out is the component was structured to allow that.
@samuelfischer3764
@samuelfischer3764 3 жыл бұрын
you could also put a selection on text with ::selection and make that a gradient
@a.anvarbekov
@a.anvarbekov 2 жыл бұрын
Hi Kevin, can you show how to do stripe's linear gradient animated background?
@Aerotk
@Aerotk 3 жыл бұрын
No one is talking about the thumbnail of the video. Pretty funny my man itself being a part of linear gradient
@grahampcharles
@grahampcharles 3 жыл бұрын
Animated text over an animated background is awesome!
@KevinPowell
@KevinPowell 3 жыл бұрын
😅 - just looking at what's possible here :)
@ga7853
@ga7853 5 жыл бұрын
That was really creative, Thanks.
@theTalkingYuccaTree
@theTalkingYuccaTree 2 жыл бұрын
Could you set the background image to repeat and just have the animation go in one direction infinitely instead of having it alternate it’s direction?
@shihab8123
@shihab8123 5 жыл бұрын
nice video. How can I use a carousel multiple times in one page.
@samuelebube6024
@samuelebube6024 Жыл бұрын
nice
@bhaviksuthar5305
@bhaviksuthar5305 6 ай бұрын
Any example for form inputs filled on focus border gradient with smoothly filled that input line with gredient color
@BikeLifePinas
@BikeLifePinas 4 жыл бұрын
hey Kevin, can you do a sample where the background changes based on the time of the day? the idea is to change the background to have sunny colors when it is day and dark blue tones when at night. :)
@gabrieldai88
@gabrieldai88 2 жыл бұрын
that is some good idea, probably you can do it with javascript. i think im gonna try it.
@chonky_fox4067
@chonky_fox4067 2 жыл бұрын
@@gabrieldai88 have you done it yet?
@gabrieldai88
@gabrieldai88 2 жыл бұрын
@@chonky_fox4067not yet
@aktharfarvees99
@aktharfarvees99 3 жыл бұрын
this is use full to me thank u so much sir but one didn't work background-clip: text;
@sudaknot
@sudaknot Жыл бұрын
Can you make the white background transparent whilst still keeping the transparent txt with the gradient inside?
@abhishekva449
@abhishekva449 4 жыл бұрын
From query to here, thanks
@tahsinkabirkhan
@tahsinkabirkhan 3 жыл бұрын
Watching this exactly after 2 years
@gaurishanker10
@gaurishanker10 5 жыл бұрын
Nice video! Good one. One question though. Do you use VSCodeVim? Or any other extension for that matter? How do you navigate so fast and write at the same time??
@KevinPowell
@KevinPowell 5 жыл бұрын
Sometimes it's through the magic of editing, where I cut out scrolling around, lol. But specially on small files like this, I tend to know roughly where I'm going, so that small preview window thing on the right side makes it easy to click in the general area. I do have a few extensions, but nothing for navigating around.
Create a neon button with a reflection using CSS
21:00
Kevin Powell
Рет қаралды 532 М.
Using CSS custom properties like this is a waste
16:12
Kevin Powell
Рет қаралды 164 М.
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 15 МЛН
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 4,4 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 23 МЛН
Avoid these 5 beginner CSS mistakes
21:38
Kevin Powell
Рет қаралды 79 М.
Award Winning Animation With Only 20 Lines Of CSS?
6:59
Hyperplexed
Рет қаралды 1,7 МЛН
I tried designing and coding grainy textures for a week
5:52
Juxtopposed
Рет қаралды 355 М.
The Best Learning Tool in History - 400 years ahead of its time!
11:04
Python Programmer
Рет қаралды 85 М.
Everything You Need To Know About CSS Gradients
10:10
Colt Steele
Рет қаралды 17 М.
Make Awesome SVG Animations with CSS // 7 Useful Techniques
12:20
5 CSS mistakes that I see way too often
19:03
Kevin Powell
Рет қаралды 359 М.
#29 CSS Gradients - CSS Full Tutorial
7:28
Dev Dreamer
Рет қаралды 55 М.
A new approach to container and wrapper classes
25:27
Kevin Powell
Рет қаралды 251 М.
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 15 МЛН