I can't insert an image in css
I did everything on one video.
I did everything exactly, exactly
But already in the beginning there were problems with the picture
Here is the video -----> https://www.youtube.com/watch?v=6l3ZSOQKE5g&t=5125s
header {
background: url(../img/first-bg.jpg) no-repeat center top / cover;
height: 600px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>golden</title>
<link rel="stylesheet" href="css/Style.css">
</head>
<body>
<header>
<div class="container">
</div>
</header>
<section>
<div class="container">
</div>
</section>
<section>
<div class="container">
</div>
</section>
<section>
<div class="container">
</div>
</section>
</body>
</html>
0
1 answers
header {
background: url(https://cdn.pixabay.com/photo/2015/07/28/22/03/fireworks-865104_960_720.jpg) no-repeat center top;
background-size: cover;
height:var(--height);
}
:root {
--height: 100px
}
section:nth-child(odd) {
background: yellow;
height:var(--height);
}
section:nth-child(even) {
background: green;
height:var(--height);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>golden</title>
<link rel="stylesheet" href="css/Style.css">
</head>
<body>
<header>
<div class="container">
</div>
</header>
<section>
<div class="container">
</div>
</section>
<section>
<div class="container">
</div>
</section>
<section>
<div class="container">
</div>
</section>
</body>
</html>
0
Author: Coder, 2020-01-02 11:29:38