Myvideo

Guest

Login

srcset and sizes attributes - images on the web | part one

Uploaded By: Myvideo
1 view
0
0 votes
0

Using srcset allows us to load in different versions of the same image based on the size of the viewport, or the pixel density of the user’s device. This is really helpful as it’s one relatively easy way to go about reducing bandwidth for users on lower end devices while ensuring that users on high-end devices get nice, crisp images. One cool thing with this is, it’s all done with html, but the downside of it is that it can bulk up your markup a little bit, and we all like having clean markup. The other strange thing is, if you use the sizes attribute, you are actually going to be including media queries in your html... which is kind of strange. But it makes sense that this is all done in the markup and not the CSS with how the spec works, it just creates this weird thing where the markup ... #Kevin_Powell #tutorial #html #css #images_on_the_web #html_images #srcset #sizes #scrset_attribute 20181205 2QYpkrX2N48

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later