Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
sizesの指定が一つの場合のsrcsetのサンプル
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<style>
body {
min-width: 0;
text-align: center;
padding: 0;
margin: 0;
}
img {
min-width: 0;
padding: 0;
margin: 0;
}
</style>
</head>
<body>
<img sizes="80vw" srcset="https://dummyimage.com/100x100/000/fff 100w, https://dummyimage.com/200x200/000/fff 200w, https://dummyimage.com/300x300/000/fff 300w, https://dummyimage.com/400x400/000/fff 400w, https://dummyimage.com/500x500/000/fff 500w, https://dummyimage.com/600x600/000/fff 600w, https://dummyimage.com/700x700/000/fff 700w, https://dummyimage.com/800x800/000/fff 800w" src="https://dummyimage.com/10x10/000/fff" />
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment