Created
June 20, 2022 21:06
-
-
Save yuriy-o/605babfa167779890613f6ca1c64cac4 to your computer and use it in GitHub Desktop.
тег <picture> для зображень 1х, 2х, jpg та webp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<picture> | |
<source | |
media="(min-width: 1280px)" | |
srcset=" | |
./images/gallery/gallery-2_lg.webp 1x, | |
./images/gallery/gallery-2_lg@2x.webp 2x | |
" | |
type="image/webp" | |
/> | |
<source | |
media="(min-width: 1280px)" | |
srcset=" | |
./images/gallery/gallery-2_lg.jpg 1x, | |
./images/gallery/gallery-2_lg@2x.jpg 2x | |
" | |
type="image/jpg" | |
/> | |
<source | |
media="(min-width: 768px)" | |
srcset=" | |
./images/gallery/gallery-2_md.webp 1x, | |
./images/gallery/gallery-2_md@2x.webp 2x | |
" | |
type="image/webp" | |
/> | |
<source | |
media="(min-width: 768px)" | |
srcset=" | |
./images/gallery/gallery-2_md.jpg 1x, | |
./images/gallery/gallery-2_md@2x.jpg 2x | |
" | |
type="image/jpg" | |
/> | |
<source | |
media="(max-width: 767px)" | |
srcset=" | |
./images/gallery/gallery-2_sm.webp 1x, | |
./images/gallery/gallery-2_sm@2x.webp 2x | |
" | |
type="image/webp" | |
/> | |
<source | |
media="(max-width: 767px)" | |
srcset=" | |
./images/gallery/gallery-2_sm.jpg 1x, | |
./images/gallery/gallery-2_sm@2x.jpg 2x | |
" | |
type="image/jpg" | |
/> | |
<img | |
class="work__img" | |
src="./images/gallery/gallery-2_sm.jpg" | |
alt="Masters during haircut" | |
width="418" | |
height="360" | |
loading="lazy" | |
/> | |
</picture> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment