Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this lab, you will add responsive images to the Egypt vacation webpage as shown below. Webpage shows Egypt page from a mobile device with
In this lab, you will add responsive images to the Egypt vacation webpage as shown below.
Webpage shows Egypt page from a mobile device with three images showing various places around Egypt.
Step : Show images for different DPRs points
Modify the first in egypt.html to use the srcset attribute. Show egyptjpg on a DPR screen, egyptjpg on a DPR screen, and egyptjpg on a DPR screen. Note that all images in this lab are in the images folder, so each image filename must be prefaced with "images Ex: imagesegyptjpg
The Chrome DevTools' Network tab can be used to verify that the appropriate image is requested depending on the DPR Ex: The screenshot below shows egyptjpg is requested when the DPR is
Chrome DevTools screenshot.
Step : Change image sizes for different viewport widths points
Modify the second in egypt.html to use the srcset and sizes attributes.
The srcset attribute should indicate the image names and associated sizes:
luxorjpg is pixels wide
luxorjpg is pixels wide
luxorjpg is pixels wide
The sizes attribute should describe the image size requirements for various viewport widths:
When the viewport width is at least px wide, the image width should be px
When the viewport width is at least px wide, the image width should be px
The default image width should be px
Don't forget the preface "images before image filenames. Resizing the browser width should cause the three different images to display at the and breakpoints.
Step : Add art direction for different viewport widths points
Add tags around the third in egypt.html Then add the appropriate tag inside so hotelwide.jpg displays instead of hotelnarrow.jpg when the viewport width is at least px wide.
Resizing the browser should display hotelnarrow.jpg when the viewport width is px wide and hotelwide.jpg otherwise.
Step : Show SVG image for list background points
Modify styles.css so check.svg is displayed centered in the background of the unordered list. Set the following CSS properties:
backgroundimage should display imageschecksvg
backgroundrepeat should be norepeat
backgroundposition should be center
backgroundsize should be vw
Resizing the browser width should cause the check.svg image to grow and shrink.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started