Це відео не доступне.
Перепрошуємо.
Controlling background-images | CSS Tutorial
Вставка
- Опубліковано 10 сер 2024
- A deep dive into CSS background-image, including a look at background-size, background-repeat, and a deep dive into background-position.
/// Code
codepen.io/kevinpowell/pen/ab...
/// Chapters
00:00 - Introduction
01:07 - background-image basics
02:08 - background-repeat and size
03:49 - background-position with units
05:11 - background-position with keywords
05:46 - keywords with offsets
07:27 - controlling multiple background images
09:14 - background-size: cover
16:14 - outro
#css
--
Come hang out with other dev's in my Discord Community
💬 / discord
---
Keep up to date with everything I'm up to
✉ www.kevinpowell.co/newsletter
---
Help support my channel
👨🎓 Get a course: www.kevinpowell.co/courses
👕 Buy a shirt: teespring.com/stores/making-t...
💖 Support me on Patreon: / kevinpowell
---
My editor: VS Code - code.visualstudio.com/
---
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 UA-cam channel, make sure to follow me on Instagram and Twitter.
Instagram: / kevinpowell.co
Twitter: / kevinjpowell
Codepen: codepen.io/kevinpowell/
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
Best CSS teacher ever!
confirming!
no man its Tayfun Erbilen in other words PROTOTURK :)
i dont mean to be so off topic but does someone know of a way to get back into an Instagram account?
I was dumb forgot the account password. I would love any assistance you can give me
@Bodhi Misael instablaster =)
@Rohan Jimmy thanks so much for your reply. I got to the site on google and Im waiting for the hacking stuff atm.
Seems to take quite some time so I will get back to you later with my results.
So many nice tricks in one video. That's what I call adding value! Great job!
Thanks, glad you enjoyed it :D
I was looking for this. Very helpful to me.
Love your explaining.
I've struggled with background image placement for ages and have faffed around and wasted so much time gettimg them to look right when also trying to be responsive....This short tutorial has helped me no end!
Thanks Kevin!!!
This is the course I have been looking for from a very long time, love your videos 💛
Oh crap. I spent a night wondering why the image wouldn't display in the bg...
It was an empty div.
Thanks Kev.
I love your stuff!!!
I never get bored while watching your videos. They are really fun!
Thank you for the detail of this video. This is really fascinating!
The king of css dropped another masterpiece, thank you so much ❤
Thank you so much for this tutorial, i was needing precise background image positioning. Always something to learn from you. The best CSS teacher indeed!
Excellent content as always, Kevin. Thanks mate!
Nice pace and plethora of examples. Excellent tutorial. Thanks.
Another SUPERB video there Kevin, and another one for my CSS toolbox - thank you.
WOW you are playing the hits this month!!! don't stop thank you!
I started watching you 5-6 weeks ago because you had a great video about a thing i needed to know then. Now i just watch because its fun and interesting. Nice vid Kevin. :D
So glad that you're sticking around and enjoying the content!
This video came right on time (after cracking my head for a few hours). Thanks Kevin!
Thank you so much! The level of frustration I’ve had for weeks was resolved within the first 3:11 of your video 💆🏾♀️
I am onto an assignment and I found this content very helpfull, very well explained with a clear pronunciation. Thank you Kevin
I am in my early stages of learning.
You definitely were a life saver I stumbled upon, your videos explain the process so clearly! Thank you!
Thank you , was struggling with some concepts while working, you made it easy
Your teaching skills is so precise and coherent... Thank you so much!
I appreciate this briefest of overviews! Thank you! I'm a streamer who knows NOTHING about programming! Lol!
Also! I love your outro so much that I've subscribed to your channel "Don't forget to make your corner of the internet just a little more awesome!" LOVE IT!!! SUBSCRIBED!
this was such a great video as well !! thank you Kevin
you're so helpful and easy to understand, i appreciate you!
Thanks for all kevin, I really appreciate your content
Kevin, thank you so much for your CSS lessons!
That is awesome! Thanks for these wonderful tutorials!
This was so awesome. Thank you so much for this!
Another gem, KP.
I was hoping you'd say something about sprites (big images made by tiling all normal ones - makes for quicker loading of images from the web server) and their manipulation.
just got it Kevin . Great info. Thanks again
You are such a good teacher !!! Holy shyt 👏🏾👏🏾👏🏾👏🏾👏🏾
Great! Your video helped me a lot.
This just help in a project for an interview, thank you
Awesome!
Thanks for always being so dang helpful!
This was just *Chefs Kiss* amazing. hitting all the buttons on your channel because of this.
Learned so much watching your content, thanks for your videos
Thank you so much Kevin!!! Indeed it would be nice, if there is even more content with background-images such as background-attachment. Take care
Pretty cool tutorial. Thank you very much for dedicating some time to helping other newbies.
Wow amazing. Needed this.
Another wonderful video. Thanks so much for your time and effort. Kevin, do you begin every project with a "base css" file that you apply to each and every project? For example, margin and box-size settings, etc., If so, can you recommend any? Thanks.
very helpful tutorial kevin. thanks for sharing
Thank You for saving loads of web-surfing time. Really generous and useful content.
Thank you so much! You helped me a ton.
Thank you so much, this was really helpful :)
Thanks for great video my man.
This helped me so much!!!
Where were you all these years?
Such an awesome teacher you are!
Respect from INDIA. 🙏🏻
Great video Kevin, thanks 😊
My Request: Custom Fonts
Where to get fonts. Storing them on the website’s own server (for fastest and most reliable loading) and which font files types should be used for full browser support. Then how to setup with CSS.
I can do this, but it would be good see best practice to check if I could do it a better way.
Thank you. It is a wonderful tutorial..
Thank you Kevin, super helpful content..👍🏽
why so much informative videos have so much less views,
Sir you're the best teacher
Best class of the year ✨
Wow...very helpful content am looking forward for more helpful videos like this.....I think with this video i now can center svgs behind images to my liking.
I’m struggling with controlling a background video. You’re always close to my needs every show !!!! Css guru right here everybody🙌🏻 !!
Oh @Kevin Powell btw 0.75x is my sweet spot when you’re zooming. It’s like your my kinda normal then lol. Otherwise I have to go drink 3 cups of coffee and then tell my dog to hold my beer I’m going for it on normal speed lol .. ty Kevin for your help and hard work..
You are the best and your videos are life saver. ❤️
Thanks for this tutorial.
Thank you so much
You really help me
Thank you soooo much !!!🔥🔥🔥🔥
big Fan of Kevin Powell he doing smart work for us -- "LOVE FROM INDIA"
Many thanks for this video, many strange issues with background-images are clear now. BTW, you look awesome in these glasses: D
Glad you liked the video, and the glasses 😃
Liked and subscribed. Your video was so good. You deserve it 🔥👨🚒
This is cool. Thanks dude.
Hi Kevin, as always, thank you for great video! It would be cool if you can also show some examples how to deal with multiple fullscreen backgrounds. E.g. build some simple website with few text containers and add 3-4 1920x1080 backgrounds one below the other (or some big images in different sizes to add a bit of complexity) and then show how to control background and text container on responsive website.
Thanks for the suggestion! Could be fun, sounds like something maybe with scroll-snap type stuff could be useful.
You are the best programmer bro!, keep it up and so nice bro!
keep the great work
thank u
Something cool I did with background images recently uses a bunch of the things you talked about here.
I had a design where there were borders on elements that didn't go the entire width of the container. So instead of using pseudo-elements, or border image I used linear-gradient as a background, and used background-size to make it not go the full width of the box. Something like:
background-image: linear-gradient(black, black);
background-position: bottom left;
background-size: 60% 2px;
background-repeat: no-repeat;
Now no matter how big the box is, it'll have what looks like a border going partway through the element. You can also combine it with multiple background images, so there's one partial border on the left, and one on the bottom.
Cool idea!
love love love LOVED this video
thanks it was very helpful
Absolute legend 👑
Thank you so much sir ❤😍
I really like you kevin you are an amazing teacher
Muchas gracias amigo, me ayudaste para darle solución. ¡Saludos desde Perú!
awesome thanks!!
it was very helpful, sir🥰
Layering backgrounds can be fun. How about adding the common image overlay without a pseudo element or a dedicated overlay element.
thanks bro
Good video. Thank you
This is awesome
Hello Kevin.
I would love to find out how to control the scrolling behavior on parallax images. I have not worked with parallax a lot, but I am noticing where the view of the image starts at the very bottom and as you scroll down the page, the view of the image moves from the bottom to the top. I would prefer the opposite to happen. How do you recommend reversing the current scrolling behavior?
Thank you Kevin! This was great. Could it be possible for you to make a video talking about accessibility? I believe you said you aren't an expert on it, but maybe you could teach us some basic things regarding aria roles and how screen readers work!
I've got something in the works with someone who is an expert :)
Thanks for sharing
thank you so much sir
Saying once again, Thank you sir 👍
Thank you so much for this wonderful video
You solved my problem😍😍😍😍😍😍👍👍👍👍👌👌👌👌✨✨
VERY NICE!
Thank you😁
thank you!
Great..thanks so much...
Me : Kevin you dropped something
Kevin : what ?
Me : A Masterpiece
Nice explanations as always, Kevin. As a suggestion, although I've been working with css for a few years, in one project I had to finish for a client not so long ago, they were using border-image for making quite ellaborated frames for floating content, just using one image, taking part of that image to repeat horizontally and vertically, and also using some parts of the image as decoration. I had never used or seen something like that, but it was really useful for having just one image for variable sized floating info messages. Maybe you could do a video about it. Thanks!
love this guy😂💯
So not defining position for each of the background layers was why the background image and my gradiant layers would move out of wack. Finally! Thank you! Haha.
Thanks for the great video! Question - Is there a way to take an image that is background: cover and zoom in on it with css? Thanks!
Great video Kevin! Could it be possible to make a video about opacity in the background images in order to read correctly the text? Thank you!!
Thank you
Thank you Thank you Thank you..............Kevin♥️
Awesome. And not just a little bit.
nice video!
Where in the world has that second offset property for background-position been my entire career‽ Amazing.
I was *so* happy when I found out about it, lol. I just wish it would work based off 'center' as well.