是否可以指定在 fancyBox 3 中使用哪个转换?我对 3 个转变感兴趣:
- 打开幻灯片/画廊
- 在幻灯片之间导航
- 关闭幻灯片/图库
默认情况下,fancyBox 3 对不同类型的内容使用不同的过渡。
<a href="img.jpg" data-fancybox><img src="thumb.jpg"></a> <!--This will zoom in-->
<a data-fancybox href="#html-content">Open</a> <!--This will fade in-->
<div id="html-content" style="display: none;">
<p>This content does just fades in.</p>
</div>
看这个codePen http://codepen.io/Stadly/pen/ZebOWE查看它的实际效果,包括导航转换。对于图像,我们有:
- Zoom in
- 水平滑动
- Zoom out
对于 html 内容,我们有:
- Fade in
- 水平滑动
- Fade out
是否可以更改 fancyBox 3 中的默认行为?例如让图像淡入和淡出?我在 中找不到任何相关信息文档 http://fancyapps.com/fancybox/3/docs/.
从 fancyBox 版本 3.1.20 开始,这可以通过选项animationEffect
and transitionEffect
。你可以找到文档here http://fancyapps.com/fancybox/3/docs/#options.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)