How to include a CSS background image 🏙️
Vložit
- čas přidán 9. 09. 2024
- #CSS #tutorial #course
CSS background image tutorial example explained
body{
background-image: url(background.jpg);
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-size: cover;
}
Bro Code
Hello
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Provident, laboriosam. Quasi voluptate, consequuntur quo atque ipsum vitae saepe necessitatibus debitis eius numquam minima quam laudantium, quis tempora molestias tenetur velit.
/* style.css */
body{
background-image: url(background.jpg);
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-size: cover;
}
how to copy this
how to copy this
how to copy this
ang lupet mo bro!
❤
You're honestly such a bro for all your work.
THANK YOU SO MUCH! Other videos make me confused and the output isn't showing up, BUT THIS SAVES MY LIFE
I rarely leave a message. But here we go: THANK YOU! So many others were so fast or skipped steps(probley due to that its automated for them,which I get) but this time I understood it! OMGoodness, I did a lil old lady happy dance
Amazing i feel now like a web developer:D
THANK YOU SO MUCH THIS IS WORKKKKK! May you be blessed throughout your life
you are a life safer, cannot believe this can solve a problem i having been trying to find a solution for the past 2 days
my teacher of all the time God bless you
You are a Sigma, wow bro!
You are a lifesaver, love you man
❤🎉 Thanks bro you made me a better bro.
thank you so much i am trying to fit the image to background thanks for this video now i am not forgetting this
Awesome
Thanks bro saved my life❤
Thank you, been looking for this for 30 mins and found nothing helpful, finnaly found ur vid and solved the problem. Thanks!
You are a real Master, bro! Respect!!
BROOO IMY SO MUCH I"M GLAD THAT YOU ARE BACK
Thx i understood everything❤
Thanks my problem is solved
Brooooooooooooooooooo ✨
Thank you very much, that was a great help.
Thanks❤
Bruh ur videos are always awesome thanks
Thank You so Much . It helped alot !!!
bro you helped me twice good job
I just watched another video on this, and the person did this same code but it was within HTML file in and it had the same outcome. Is there a difference in doing this? I feel the HTML and CSS being separated keeps it much more organized and a clean look unless there's a vast difference in doing it in the HTML file.
What you are talking about is "inline css" and it has the highest priority meaning that if you were to style the same elements with different values in an external stylesheet, the inline style values would show. It goes in this order from highest to lowest priority. Inline css, internal css, external css. Inline means you style them directly, internal means you use elements and external means a seperate stylesheet you import into html. I agree, it's best to use an external stylesheet but it has it's applications.
thank you very much you are the best
thank you
Thank you so much, imthis was extremely helpful
🔥🔥🔥🔥🔥🔥🔥
Totally loved it
Very cool 🎉
Thanks
Thank you..... that was very helpful ❤
Good work bro code
It doesn't work at my place😕🙁☹
Same
same
@@FahimaAkter-vj7dm
there has to be something you’re doing wrong. it works perfectly fine for me.
@@lilduckeyy I have fixed that problem. Thanks.
Have you tried changing your place
Thanks bro. It worked.
Thanks Bro!
thanks bro 👍👍👍
thank bro it's working thank 🤩
Thank you bro👍👍
Very nice man
bro, i love you!
Thank you very much broo!!
//thanks
a life saver
Thank you!
youre the boss!!!!
Tysm bro🎉🎉🎉
❤
thank u so much
Thank you 🙏
But why the svg doesn't work when i put it as a background img
Thank you❤❤
thanksssss
this works but how come my microsoft expressions program is saying this isn't the current schema?
“It works on my machine”
How did the html and style sheet become automatically linked to each other?
How do you add a background image to a 2nd page?
TYSM
body {
width: 100%;
height: 100vh;
margin: 0px;
padding:0px;
background-image: url(2turdsplaying[169].jpg);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
I have the img file in my folder so does anyone know why my background pic isn't displaying?
Where can i find great high pixel images for free?
Plz do full stack web development course
What is the size of the image
more than 2 days searching and i still cannot see a backgroung , even when y click the url link in css i can see the image im gonna blow my computer
why it doestn work for me
bro this code is not working in blogger website bro
Sir still it is not working for me sir
What program are you using in this video?
VScode
why when I use backround image it will gonna be blury
Maybe you could add a vector image instead
he is a bro
Wait, this code works in Khan Academy? I didn't know that!
it works every were😁😁
exept my vs code😒😒
this code doesn't work for me at all, doesn't do anything and visual studio says they are wrong??
if your background image is in its own folder then your code should look like: background-image: url(images/background.jpg); Where I typed images is the name of the folder where the image will be, however your folder might have a different name.
it still does not work😮💨😮💨@@hubjinthegreat
@@hubjinthegreat hey , I have written that way but the image still does not appear on the live server.
Thank you😊@@hubjinthegreat
chur bro