Skip to content

Commit

Permalink
Merge pull request #15 from JulieSagan/06-lection/background-img
Browse files Browse the repository at this point in the history
Used background-image
  • Loading branch information
jsru-1 authored Dec 19, 2024
2 parents b647b4a + 421f955 commit c6f98e0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
26 changes: 26 additions & 0 deletions 06-lection4/02-background-image/background-image.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.background {
width: 100%;
height: 400px;
background-image: url(./public/forest_400.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}

@media screen and (min-width: 768px) {
.background {
background-image: url(./public/forest_768.jpg);
}
}

@media screen and (min-width: 1024px) {
.background {
background-image: url(./public/forest_1024.jpg);
}
}

@media screen and (min-width: 2560px) {
.background {
background-image: url(./public/forest_2560.jpg);
}
}
5 changes: 4 additions & 1 deletion 06-lection4/02-background-image/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<link rel="stylesheet" href="./background-image.css">
</head>
<body>

<div class="container">
<div class="background">
</div>
</div>
</body>
</html>

0 comments on commit c6f98e0

Please sign in to comment.