Zurb foundation 如何在基础5交换的媒体查询中组合多个参数?

Zurb foundation 如何在基础5交换的媒体查询中组合多个参数?,zurb-foundation,Zurb Foundation,In表示,如果需要,甚至可以在媒体查询中组合多个参数,但没有示例 我尝试了不同的方法,但找不到任何有效的方法: <div data-interchange=" [/path/to/default.jpg, (default)], [/path/to/retina-landscape-image.jpg, (retina landscape)], [/path/to/retina-landscape-image.jpg

In表示,如果需要,甚至可以在媒体查询中组合多个参数,但没有示例

我尝试了不同的方法,但找不到任何有效的方法:

<div data-interchange="
            [/path/to/default.jpg, (default)], 
            [/path/to/retina-landscape-image.jpg, (retina landscape)],
            [/path/to/retina-landscape-image.jpg, (retina, landscape)],
            [/path/to/retina-landscape-image.jpg, (retina and landscape)],
            [/path/to/retina-landscape-image.jpg, (retina), (landscape)],
            [/path/to/retina-landscape-image.jpg, (retina) and (landscape)],
            [/path/to/retina-landscape-image.jpg, (retina) (landscape)]"></div>
给我default.jpg

<div data-interchange="
            [/path/to/default.jpg, (default)], 
            [/path/to/retina-landscape-image.jpg, (retina)]"></div>

        <div data-interchange="
            [/path/to/default.jpg, (default)], 
            [/path/to/retina-landscape-image.jpg, (landscape)]"></div>
两者都给我retina-landscape-image.jpg,所以这两个条件都是真的,问题在于请求这两个条件的语法


我知道我可以进行自定义查询,但如果文档说您可以进行自定义查询,那么一定有办法。

我认为您目前无法在一个子句中使用多个“命名查询”,因为我不相信interchange支持将这些查询串联起来。Interchange将获取该字符串,然后查找与之相关联的媒体查询,不管是retina还是大型查询,但它目前不处理AND运算符的任何概念

div data-interchange="[/path/to/default.jpg, (default)], [/path/to/retina-landscape-image.jpg, (retina)]"></div
景观:

only screen and (orientation: landscape)
结合这些

only screen and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (min--moz-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (-o-min-device-pixel-ratio: 2/1) and (orientation: landscape),
only screen and (min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (min-resolution: 192dpi) and (orientation: landscape),
only screen and (min-resolution: 2dppx) and (orientation: landscape)
我知道这很冗长,但这是视网膜媒体对你的查询!最后,如果要将此字符串放入交换

<div data-interchange="[/path/to/default.jpg, (default)], [/path/to/retina-landscape-image.jpg, (only screen and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (min--moz-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (-o-min-device-pixel-ratio: 2/1) and (orientation: landscape),
only screen and (min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (min-resolution: 192dpi) and (orientation: landscape),
only screen and (min-resolution: 2dppx) and (orientation: landscape))]"></div>

你会做生意的

交换曾经为你工作过吗?您确定视口元已就位吗@道格:当然,它在工作,是的,视口已经就位,一切都在工作,我只是不知道如何建立一个交换规则,将两个查询结合起来,就像文档中说的:使用视网膜图像,你可以通过使用像素密度媒体查询,轻松地包括视网膜图像。如果需要,您甚至可以在媒体查询中组合多个参数。
<div data-interchange="[/path/to/default.jpg, (default)], [/path/to/retina-landscape-image.jpg, (only screen and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (min--moz-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (-o-min-device-pixel-ratio: 2/1) and (orientation: landscape),
only screen and (min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (min-resolution: 192dpi) and (orientation: landscape),
only screen and (min-resolution: 2dppx) and (orientation: landscape))]"></div>