首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >与Foundation 6的自定义交换查询

与Foundation 6的自定义交换查询
EN

Stack Overflow用户
提问于 2016-06-02 18:25:09
回答 1查看 651关注 0票数 1

我试图添加一个自定义媒体查询到交换视网膜笔记本电脑,但它似乎没有得到重视。我肯定有些东西在错误的地方,或者哪里有错误的语法。有什么想法吗?

HTML:

代码语言:javascript
复制
<div 
class="responsive-bg" 
data-interchange="
    [http://brycekirk.com/man-mountain/small.jpg, small], 
    [http://brycekirk.com/man-mountain/medium.jpg, medium], 
    [http://brycekirk.com/man-mountain/large.jpg, large], 
    [http://brycekirk.com/man-mountain/xlarge.jpg, xlarge]
    [http://brycekirk.com/man-mountain/largeretina.jpg, largeretina]"></div>

CSS:

代码语言:javascript
复制
div.responsive-bg {height: 100vh; width: 100%; position: absolute; }

联署材料:

代码语言:javascript
复制
$(document).foundation();
Foundation.Interchange.SPECIAL_QUERIES['largeretina'] = 'only screen and (min-width: 1025px) and (-webkit-min-device-pixel-ratio: 2) and (min-resolution: 192dpi)';

交换文件

科德芬

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-03 10:59:43

它无法工作,因为您是在基础初始化之后添加自定义查询,您必须使用基金会再流,或者可以在init代码之前设置媒体查询。

代码语言:javascript
复制
Foundation.Interchange.SPECIAL_QUERIES['largeretina'] = 'only screen and (min-width: 1025px) and (-webkit-min-device-pixel-ratio: 2) and (min-resolution: 192dpi)';

$(document).foundation();
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37599492

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档