源命令是否添加了 <source>
元素重要吗?我将添加多种文件格式并使用类型属性来支持浏览器。所以如果没有media
标签来引导浏览器。它如何选择要使用的源标记?
最佳答案
Very much like it does when using the sizes algorithm, the browser goes over the list of sources and picks the first one that matches. A match can happen based on both media and type attributes.
链接到规范,我有时觉得很难阅读并获得直接答案:select-an-image-source
关于html - <picture>元素srcset顺序重要性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39644823/