我想知道我是否可以定义AMP图像的大小,不仅是两个不同的宽度,例如三个甚至四个:
<amp-img
media="(min-width: 650px)"
src="wide.jpg"
width=466
height=355 layout="responsive" ></amp-img>
<amp-img
media="(max-width: 649px)"
src="narrow.jpg"
width=527
height=193 layout="responsive" ></amp-img>我试图通过min-width和max-width的并行定义来实现它,但它似乎不起作用。这样的事情有可能吗?
发布于 2017-01-27 06:36:39
可以,您可以使用srcset属性。更多信息可以在here上找到。
https://stackoverflow.com/questions/41883719
复制相似问题