How to include a CSS background image 🏙️
HTML-код
- Опубликовано: 20 сен 2023
- #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
THANK YOU SO MUCH THIS IS WORKKKKK! May you be blessed throughout your life
You are a real Master, bro! Respect!!
You are a lifesaver, love you man
BROOO IMY SO MUCH I"M GLAD THAT YOU ARE BACK
❤🎉 Thanks bro you made me a better bro.
Totally loved it
Very cool 🎉
Thx i understood everything❤
Very nice man
bro you helped me twice good job
Thank you very much, that was a great help.
Bruh ur videos are always awesome thanks
Thank you..... that was very helpful ❤
Thank you so much, imthis was extremely helpful
bro, i love you!
thanks bro 👍👍👍
Thank you so much man 😄😁
Thank you, been looking for this for 30 mins and found nothing helpful, finnaly found ur vid and solved the problem. Thanks!
Tysm bro🎉🎉🎉
Thank you bro👍👍
Good work bro code
thank bro it's working thank 🤩
How did the html and style sheet become automatically linked to each other?
Thank you 🙏
Thanks bro
Thanks Bro!
Thanks
this works but how come my microsoft expressions program is saying this isn't the current schema?
youre the boss!!!!
a life saver
Plz do full stack web development course
thanksssss
Thank you❤❤
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.
Yeah it’s exactly what the guy above said. You probably want to modularize your code (separate files) depending on the size of your project.
TYSM
How do you add a background image to a 2nd page?
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
What is the size of the image
❤
🔥🔥🔥🔥🔥🔥🔥
Where can i find great high pixel images for free?
What program are you using in this video?
VScode
bro this code is not working in blogger website bro
why when I use backround image it will gonna be blury
Maybe you could add a vector image instead
Sir still it is not working for me sir
he is a bro
Wait, this code works in Khan Academy? I didn't know that!
it works every were😁😁
exept my vs 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.
@@url0c4lpookie I have fixed that problem. Thanks.
Have you tried changing your place
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.
chur bro