查看: 9863|回复: 0

Colorbox使用方法及参数设定—中英文

[复制链接]
发表于 2014-9-10 11:24:11 | 显示全部楼层 |阅读模式
插件下载 colorbox-master.zip (1.02 MB, 下载次数: 7)

Colorbox使用方法及参数设定—中英文
  
设置的值
  
默认值
介绍
transition
"elastic"
The transition type. Can be set to "elastic",  "fade", or "none".
  
过渡效果,可以是"elastic",  "fade", or "none".
speed
350
Sets the speed of the fade and elastic transitions, in milliseconds.
  
设置过渡效果的持续时间,毫秒
href
false
This can be used as an alternative anchor URL or to associate a URL for  non-anchor elements such as images or form buttons. Example:
  $('h1').colorbox({href:"welcome.html"})

  
这个用来设置一个锚标记的值或者一个不是锚的元素,例如图像或者表单的按钮,例如:
  $('h1').colorbox({href:"welcome.html"})
title
false
This can be used as an anchor title alternative for ColorBox.
  
这可以为Colorbox设置一个标题
rel
false
This can be used as an anchor rel alternative for ColorBox. This allows  the user to group any combination of elements together for a gallery, or to  override an existing rel so elements are not grouped together. Example:
  $('#example a').colorbox({rel:'group1'})

  
这个可以根据元素的rel属性设置要显示的元素集合,也可以覆盖一个存在的rel属性。例如:
  $('#example a').colorbox({rel:'group1'})
width
false
Set a fixed total width. This includes borders and buttons. Example:  "100%", "500px", or 500
  
设置宽度,包括边框和按钮
height
false
Set a fixed total height. This includes borders and buttons. Example:  "100%", "500px", or 500
  
设置高度,包括边框和按钮
innerWidth
false
This is an alternative to 'width' used to set a fixed inner width. This  excludes borders and buttons. Example: "50%", "500px", or  500
  
这个可以设定一个固定的内大小,包括边框和按钮
innerHeight
false
This is an alternative to 'height' used to set a fixed inner height.  This excludes borders and buttons. Example: "50%",  "500px", or 500
  
这个可以设定一个固定的内高度,包括边框和按钮。例如:“50%”,“500px”或者500
initialWidth
300
Set the initial width, prior to any content being loaded.
  
设置初始化宽度
initialHeight
100
Set the initial height, prior to any content being loaded.
  
设置初始化高度
maxWidth
false
Set a maximum width for loaded content. Example: "100%", 500,  "500px"
  
设置内容的最大宽度
maxHeight
false
Set a maximum height for loaded content. Example: "100%", 500,  "500px"
  
设置内容的最大高度
scalePhotos
true
If 'true' and if maxWidth, maxHeight, innerWidth, innerHeight, width, or  height have been defined, ColorBox will scale photos to fit within the those  values.
  
如果是true且maxWidth, maxHeight, innerWidth,  innerHeight, width, 或者 height 被设置,Colorbox会缩放图片以使用边框
scrolling
true
If 'false' ColorBox will hide scrollbars for overflowing content. This  could be used on conjunction with the resize method (see below) for a  smoother transition if you are appending content to an already open instance  of ColorBox.
  
如果是false,Colorbox不会为了溢出元素设置滚动条
iframe
false
If 'true' specifies that content should be displayed in an iFrame.
  
如果是true,元素会在Iframe中显示
inline
false
If 'true' a jQuery selector can be used to display content from the  current page. Example:
  $("#inline").colorbox({inline:true,  href:"#myForm"});

  
如果是true,jQuery选择器可以用来选择要显示的元素。例如:$("#inline").colorbox({inline:true,  href:"#myForm"});
html
false
This allows an HTML string to be used directly instead of pulling  content from another source (ajax,  inline, or iframe). Example:
  $.fn.colorbox({html:'<p>Hello</p>'});

  
这个是直接让你显示HTML代码,例如:
  $.fn.colorbox({html:'<p>Hello</p>'});
photo
false
If true, this setting forces ColorBox to display a link as a photo. Use  this when automatic photo detection fails (such as using a url like  'photo.php' instead of 'photo.jpg', 'photo.jpg#1', or 'photo.jpg?pic=1')
  
如果为true,ColorBox只会把元素按照图片显示,防止类似photo.php?pic=1这样的连接被误认为是网页
opacity
0.85
The overlay opacity level. Range: 0 to 1.
  
遮罩层不透明度 从0-1之间取值
open
false
If true, the lightbox will automatically open with no input from the  visitor.
  
如果为true,ColorBox会自动开启
preloading
true
Allows for preloading of 'Next' and 'Previous' content in a shared  relation group (same values for the 'rel' attribute), after the current  content has finished loading. Set to 'false' to disable.
  
如果为True,ColorBox会自动预载要显示图片
overlayClose
true
If true, enables closing ColorBox by clicking on the background overlay.
  
为true单击遮罩层就可以把ColorBox关闭
slideshow
false
If true, adds an automatic slideshow to a content group / gallery.
  
为True,会自动滚动图片
slideshowSpeed
2500
Sets the speed of the slideshow, in milliseconds.
  
设置时间,毫秒
slideshowAuto
true
If true, the slideshow will automatically start to play.
  
为tuue,滑动会自动开始
slideshowStart
"start slideshow"
Text for the slideshow start button.
  
开始自动滑动按钮的文本
slideshowStop
"stop slideshow"
Text for the slideshow stop button
  
停止自动滑动按钮的文本
current
"{current} of {total}"
Text format for the content group / gallery count. {current} and {total}  are detected and replaced with actual numbers while ColorBox runs.
  
文本内容:现在正在显示的元素序号,格式"{现在} of {总计}"
previous
"previous"
Text for the previous button in a shared relation group (same values for  'rel' attribute).
  
“上一个”按钮的文本
next
"next"
Text for the next button in a shared relation group (same values for  'rel' attribute).
  
“下一个”按钮的文本
close
"close"
Text for the close button. The 'Esc' key will also close ColorBox.
  
“关闭”按钮的文本
onOpen
false
Callback that fires right before ColorBox begins to open
  
ColorBox打开之前执行
onLoad
false
Callback that fires right before attempting to load the  target content.
  
ColorBox中的内容加载之前执行
onComplete
false
Callback that fires right after loaded content is  displayed.
  
ColorBox中的内容完全加载之后执行
onCleanup
false
Callback that fires at the start of the close process.
  
ColorBox开始关闭时执行
onClosed
false
Callback that fires once ColorBox is closed.
  
ColorBox关闭之后执行

Colorbox使用方法和下载
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Fuzhou onemary network technology co., LTD

地址:中国.福建省福州市仓山区红江路79号创达商务中心7楼777室(公交车站:浦江、红江路)

Add:Room 777, 7 / f, chuanda business center, no. 79, hongjiang road, cangshan district, zhou.

raolibao@onemary.com

版权所有:万美云计算© 2012-2018 闽ICP备11018372号-1

客服热线:(+86)0591-83701411