Skip to content

Commit 96f17fe

Browse files
committed
picture 태그 적용
1 parent 7278242 commit 96f17fe

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

css/styles.css

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ section.hero img {
101101
width: 100%;
102102
height: auto;
103103
filter: brightness(50%);
104-
display: none;
105-
}
106-
107-
section.hero img.desktop {
108-
display: initial;
109104
}
110105

111106
.hero-content {
@@ -477,14 +472,6 @@ footer .copyright-text {
477472
display: inline-block;
478473
}
479474

480-
section.hero img.desktop {
481-
display: none;
482-
}
483-
484-
section.hero img.tablet {
485-
display: initial;
486-
}
487-
488475
.hero-content h1 {
489476
font-size: 40px;
490477
letter-spacing: 1px;
@@ -616,14 +603,6 @@ footer .copyright-text {
616603
height: 7px;
617604
}
618605

619-
section.hero img.tablet {
620-
display: none;
621-
}
622-
623-
section.hero img.mobile {
624-
display: initial;
625-
}
626-
627606
.hero-content {
628607
position: static;
629608
margin-bottom: 40px;

index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@
5555
</header>
5656

5757
<section class="hero">
58-
59-
<img class="desktop" src="images/Hero_Desktop.webp">
60-
<img class="mobile" src="images/Hero_Mobile.webp">
61-
<img class="tablet" src="images/Hero_Tablet.webp">
62-
63-
58+
<picture>
59+
<source media="(max-width: 576px)" srcset="images/Hero_Mobile.webp">
60+
<source media="(max-width: 960px)" srcset="images/Hero_Tablet.webp">
61+
<img src="images/Hero_Desktop.webp" alt="VR Headsets Hero Image">
62+
</picture>
6463
<div class="hero-content">
6564
<div class="container">
6665
<h1>Discover our line of VR Headsets</h1>

0 commit comments

Comments
 (0)