How to include a CSS background image 🏙️

preview_player
Показать описание
#CSS #tutorial #course

CSS background image tutorial example explained

body{
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-size: cover;
}
Рекомендации по теме
Комментарии
Автор

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bro Code</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<h1>Hello</h1>

<p>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.</p>

</body>

</html>

/* style.css */
body{
background-image: url(background.jpg);
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-size: cover;
}

BroCodez
Автор

You're honestly such a bro for all your work.

DanBauer
Автор

THANK YOU SO MUCH! Other videos make me confused and the output isn't showing up, BUT THIS SAVES MY LIFE

katelynchasie
Автор

THANK YOU SO MUCH THIS IS May you be blessed throughout your life

Beanblws
Автор

You are a real Master, bro! Respect!!

zahid
Автор

BROOO IMY SO MUCH I"M GLAD THAT YOU ARE BACK

JorielTejada-tedd
Автор

❤🎉 Thanks bro you made me a better bro.

ThandoHlongwane-zdcb
Автор

Bruh ur videos are always awesome thanks

Kiratech
Автор

my teacher of all the time God bless you

AdanJelle-wtzu
Автор

thank you so much i am trying to fit the image to background thanks for this video now i am not forgetting this

YasaruDeneth
Автор

Thank you so much, imthis was extremely helpful

TheVSI
Автор

Thank you very much, that was a great help.

deeled
Автор

Thank You so Much . It helped alot !!!

vedun
Автор

Thank you, been looking for this for 30 mins and found nothing helpful, finnaly found ur vid and solved the problem. Thanks!

iescu