FancyBox - Cool Jquery Dialog

本文详细介绍了FancyBox的各种配置选项及其默认值,包括间距、透明度、滚动条设置等,帮助开发者更好地理解和使用FancyBox插件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

KeyDefault valueDescription
padding10Space between FancyBox wrapper and content
margin20Space between viewport and FancyBox wrapper
opacityfalseWhen true, transparency of content is changed for elastic transitions
modalfalseWhen true, 'overlayShow' is set to 'true' and 'hideOnOverlayClick', 'hideOnContentClick', 'enableEscapeButton', 'showCloseButton' are set to 'false'
cyclicfalseWhen true, galleries will be cyclic, allowing you to keep pressing next/back.
scrolling'auto'Set the overflow CSS property to create or hide scrollbars. Can be set to 'auto', 'yes', or 'no'
width560Width for content types 'iframe' and 'swf'. Also set for inline content if 'autoDimensions' is set to 'false'
height340Height for content types 'iframe' and 'swf'. Also set for inline content if 'autoDimensions' is set to 'false'
autoScaletrueIf true, FancyBox is scaled to fit in viewport
autoDimensionstrueFor inline and ajax views, resizes the view to the element recieves. Make sure it has dimensions otherwise this will give unexpected results
centerOnScrollfalseWhen true, FancyBox is centered while scrolling page
ajax{ }Ajax options (error, success will be overwritten)
swf{wmode: 'transparent'}Flashvars to put on the swf object
hideOnOverlayClicktrueToggle if clicking the overlay should close FancyBox
hideOnContentClickfalseToggle if clicking the content should close FancyBox
overlayShowtrueToggle overlay
overlayOpacity0.3Opacity of the overlay (from 0 to 1; default - 0.3)
overlayColor'#666'Color of the overlay
titleShowtrueToggle title
titlePosition'outside'The position of title. Can be set to 'outside', 'inside' or 'over'
titleFormatnullCallback to customize title area. You can set any html - custom image counter or even custom navigation
transitionIn, transitionOut'fade'The transition type. Can be set to 'elastic', 'fade' or 'none'
speedIn, speedOut300Speed of the fade and elastic transitions, in milliseconds
changeSpeed300Speed of resizing when changing gallery items, in milliseconds
changeFade'fast'Speed of the content fading while changing gallery items
easingIn, easingOut'swing'Easing used for elastic animations
showCloseButtontrueToggle close button
showNavArrowstrueToggle navigation arrows
enableEscapeButtontrueToggle if pressing Esc button closes FancyBox
onStartnullWill be called right before attempting to load the content
onCancelnullWill be called after loading is canceled
onCompletenullWill be called once the content is displayed
onCleanupnullWill be called just before closing
onClosednullWill be called once FancyBox is closed

完整的API在如下链接:

http://fancybox.net/api

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值