responsive images srcset not working

后端 未结 7 1616
小蘑菇
小蘑菇 2020-11-28 07:01

I\'ve been trying to implement the new srcset approach to responsive images, using the following HTML

        

        
7条回答
  •  爱一瞬间的悲伤
    2020-11-28 07:33

    For anyone using Chrome DevTools sidebar, you can tell Chrome to disable the cache when DevTools is open. Changing your viewport and refreshing will then serve the correct responsive image if it's giving you the largest (cached) image all the time.

    1. Open DevTools (F12)
    2. Go to Settings
    3. Scroll down to Network
    4. Check Disable cache (while DevTools is open)

提交回复
热议问题