Skip to content

Commit

Permalink
Merge pull request #16 from JulieSagan/srcset
Browse files Browse the repository at this point in the history
Created image used srcset
  • Loading branch information
jsru-1 authored Dec 19, 2024
2 parents c6f98e0 + 36907fc commit 54e79f1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
33 changes: 25 additions & 8 deletions 06-lection4/03-srcset/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<link rel="stylesheet" href="../../assets/css/main.css">
<link rel="stylesheet" href="./srcset.css">
</head>
<body>

</body>
</html>

<head>
<link rel="stylesheet" href="../../assets/css/main.css">
<link rel="stylesheet" href="./srcset.css">

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Srcset</title>
</head>

<body>
<div class="image__wrapper">
<img src="./public/forest_400.jpg" alt="forest image"

srcset="
./public/forest_400.jpg 400w,
./public/forest_768.jpg 768w"

sizes="
(max-width: 400px) 300px,
(max-width: 768px) 300px">
</div>
</body>

</html>
5 changes: 5 additions & 0 deletions 06-lection4/03-srcset/srcset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.image__wrapper {
width: 300px;
height: 300px;
overflow: hidden;
}

0 comments on commit 54e79f1

Please sign in to comment.