An inspiration of picturefill using background image and not img tag

3997
    


来源:
Licence:
联系:
分类:
平台:
环境:
大小:
更新:
标签:
联系方式 :
免费下载 ×

下载APP,支持永久资源免费下载

限免产品服务请联系qq:1585269081

下载APP
免费下载 ×

下载APP,支持永久资源免费下载

下载APP 免费下载
下载 ×

下载APP,资源永久免费


如果出现不能下载的情况,请联系站长,联系方式在下方。

免费下载 ×

下载论文助手APP,资源永久免费

免费获取

如果你已经登录仍然出现不能下载的情况,请【点击刷新】本页面或者联系站长


Picturefill-background A Responsive Images approach like Picturefill but managing a picture on background-image css attribute. Note: Picturefill-background works best in browsers that support CSS3 media queries.. Markup pattern and explanation Mark up your responsive images like this. < div class = " picturefill-background " > < span data-src = " small.jpg " > < span data-src = " medium.jpg " data-media = " (min-width: 400px) " > < span data-src = " large.jpg " data-media = " (min-width: 640px) " > < span data-src = " big.jpg " data-media = " (min-width: 800px) " > Default options w . picturefillBackgroundOptions = { selector : " picturefill-background " , backgroundSize : " cover " , backgroundRepeat : " no-repeat " , backgroundPosition : " 50% 50% " }; Redefine this value to replace some of the options picturefillBackgroundOptions . selector = " custom-selector " ; Explained... Notes on the markup above... The div[class="picturefill-background"] element is used to apply background-image attribute. The div[class="picturefill-background"] element can contain any number of div[data-source] elements. Each div[data-src] element must have a data-src attribute specifying the image path. Each div[data-src] element can have an optional [data-media] attribute to make it apply in specific media settings. Both media types and queries can be used, like a native media attribute, but support for media queries depends on the browser (unsupported browsers fail silently). The matchMedia polyfill is required to support the data-media attribute in older browsers (e.g. IE9, Android 2.3 Browser). See http://caniuse.com/#feat=matchmedia for a table detailing native support for the matchMedia API.


免费下载 ×

下载APP,支持永久资源免费下载

下载APP 免费下载
温馨提示
请用电脑打开本网页,即可以免费获取你想要的了。
扫描加我微信 ×

演示

×
登录 ×


下载 ×
论文助手网
论文助手,最开放的学术期刊平台
				暂无来源信息			 
回复
来来来,吐槽点啥吧

作者联系方式

×

向作者索要->