[英]Firefox picture tag support?
我正在嘗試在Firefox中使用picture
標簽。 caniuse.com說該picture
受Firefox 33(測試版)支持,我可以手動啟用Firefox 32(當前)支持。
我從html5rocks打開了一個示例,可以看到它不起作用。 我也嘗試了自己的http://vm-0.krasulya.kd.io/ 。 webinspector網絡面板中僅對基本圖像( src
屬性)有請求。
這兩個示例都可以在Chrome Canary中使用。
根據http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html#the-picture-element HTML是正確的。
FF完全支持picture
嗎?
UPD
這是我的標記:
<picture>
<source
src="1.jpg"
type="image/jpeg"
media="(min-width: 300px)"
srcset="1.jpg, 2.jpg 2x"/>
<img
src="1.jpg"
srcset="1.jpg, 2.jpg 2x">
</picture>
在Firefox中,默認情況下仍然突然禁用scrset
屬性(甚至是Nightly,請參見Bug#870021 )。 要啟用它,請轉到about:config
並將dom.image.srcset.enabled
值設置為true
。
這是測試頁面: http : //pepelsbey.net/pres/picture/demos/retina.html
還有layout.css.devPixelsPerPx
標志,可以將其設置為2.0
以在非視網膜設備上測試視網膜。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.