fancyBox
========
fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages.
More information and examples: http://www.fancyapps.com/fancybox/
License: http://www.fancyapps.com/fancybox/#license
Copyright (c) 2012 Janis Skarnelis - janis@fancyapps.com
How to use
----------
To get started, download the plugin, unzip it and copy files to your website/application directory.
Load files in the <head> section of your HTML document. Make sure you also add the jQuery library.
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/jquery.fancybox.pack.js"></script>
</head>
Create your links with a `title` if you want a title to be shown, and add a class:
<a href="large_image.jpg" class="fancybox" title="Sample title"><img src="small_image.jpg" /></a>
If you have a set of related items that you would like to group,
additionally include a group name in the `rel` (or `data-fancybox-group`) attribute:
<a href="large_1.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_1.jpg" /></a>
<a href="large_2.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_2.jpg" /></a>
Initialise the script like this:
<script>
$(document).ready(function() {
$('.fancybox').fancybox();
});
</script>
May also be passed an optional options object which will extend the default values. Example:
<script>
$(document).ready(function() {
$('.fancybox').fancybox({
padding : 0,
openEffect : 'elastic'
});
});
</script>
Tip: Automatically group and apply fancyBox to all images:
$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox();
Script uses the `href` attribute of the matched elements to obtain the location of the content and to figure out content type you want to display.
You can specify type directly by adding classname (fancybox.image, fancybox.iframe, etc) or `data-fancybox-type` attribute:
//Ajax:
<a href="/example.html" class="fancybox fancybox.ajax">Example</a>
//or
<a href="/example.html" class="fancybox" data-fancybox-type="ajax">Example</a>
//Iframe:
<a href="example.html" class="fancybox fancybox.iframe">Example</a>
//Inline (will display an element with `id="example"`)
<a href="#example" class="fancybox">Example</a>
//SWF:
<a href="example.swf" class="fancybox">Example</a>
//Image:
<a href="example.jpg" class="fancybox">Example</a>
Note, ajax requests are subject to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy).
If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed.
(this is different from previsous versions where 'ajax' was used as default type or an error message was displayed).
Advanced
--------
### Helpers
Helpers provide a simple mechanism to extend the capabilities of fancyBox. There are two built-in helpers - 'overlay' and 'title'.
You can disable them, set custom options or enable other helpers. Examples:
//Disable title helper
$(".fancybox").fancybox({
helpers: {
title: null
}
});
//Disable overlay helper
$(".fancybox").fancybox({
helpers: {
overlay : null
}
});
//Change title position and overlay color
$(".fancybox").fancybox({
helpers: {
title : {
type : 'inside'
},
overlay : {
css : {
'background' : 'rgba(255,255,255,0.5)'
}
}
}
});
//Enable thumbnail helper and set custom options
$(".fancybox").fancybox({
helpers: {
thumbs : {
width: 50,
height: 50
}
}
});
### API
Also available are event driven callback methods. The `this` keyword refers to the current or upcoming object (depends on callback method). Here is how you can change title:
$(".fancybox").fancybox({
beforeLoad : function() {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
/*
"this.element" refers to current element, so you can, for example, use the "alt" attribute of the image to store the title:
this.title = $(this.element).find('img').attr('alt');
*/
}
});
It`s possible to open fancyBox programmatically in various ways:
//HTML content:
$.fancybox( '<div><h1>Lorem Lipsum</h1><p>Lorem lipsum</p></div>', {
title : 'Custom Title'
});
//DOM element:
$.fancybox( $("#inline"), {
title : 'Custom Title'
});
//Custom object:
$.fancybox({
href: 'example.jpg',
title : 'Custom Title'
});
//Array of objects:
$.fancybox([
{
href: 'example1.jpg',
title : 'Custom Title 1'
},
{
href: 'example2.jpg',
title : 'Custom Title 2'
}
], {
padding: 0
});
There are several methods that allow you to interact with and manipulate fancyBox, example:
//Close fancybox:
$.fancybox.close();
There is a simply way to access wrapping elements using JS:
$.fancybox.wrap
$.fancybox.skin
$.fancybox.outer
$.fancybox.inner
You can override CSS to customize the look. For example, make navigation arrows always visible,
change width and move them outside of area (use this snippet after including fancybox.css):
.fancybox-nav span {
visibility: visible;
}
.fancybox-nav {
width: 80px;
}
.fancybox-prev {
left: -80px;
}
.fancybox-next {
right: -80px;
}
In that case, you might want to increase space around box:
$(".fancybox").fancybox({
margin : [20, 60, 20, 60]
});
Bug tracker
-----------
Have a bug? Please create an issue on GitHub at https://github.com/fancyapps/fancyBox/issues
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
本项目基于Spring,整合Spring的security模块,实现用户管理和权限控制,是一套较为通用的权限控制功能,主要内容如下: 1.登录,包括“记住我”的功能; 2.加密,存储的密码不采用明文,初始密码1234; 3.拦截器:对静态文件(HTML/JS/CSS等)进行权限控制,无权限则请求不到; 4.后台接口权限控制:对后台接口启用权限控制,对应的接口若不满足权限或角色要求,则请求失败,使用@Secured实现; 5.用户-角色-权限使用常规RBAC的模型,用户到角色,角色到权限均为多对多关系映射; 6、用到的表分别为: 用户表 角色表 权限表 用户角色表 角色权限表
资源推荐
资源详情
资源评论
收起资源包目录
整合Spring+Spring security基于RBAC模型实现通用的权限控制和用户管理系统(适合新手了解学习权限相关技术) (662个子文件)
bootstrap.css 129KB
bootstrap.min.css 107KB
style_v1.css 56KB
style_v2.css 56KB
jquery-ui.css 35KB
skin.min.css 34KB
skin.ie7.min.css 34KB
jquery-ui.min.css 29KB
fullcalendar.css 21KB
bootstrap-theme.css 21KB
select2.css 19KB
bootstrap-theme.min.css 18KB
fullcalendar.min.css 10KB
leaflet.css 9KB
chartist.min.css 7KB
fullcalendar.print.css 5KB
visualblocks.css 5KB
fineuploader-5.0.5.css 5KB
xcharts.css 5KB
jquery.fancybox.css 5KB
xcharts.min.css 4KB
fineuploader-5.0.5.min.css 4KB
jquery.bootgrid.min.css 4KB
select2-bootstrap.css 3KB
justifiedGallery.css 3KB
jquery.fancybox-buttons.css 2KB
justifiedGallery.min.css 2KB
content.min.css 1KB
content.inline.min.css 1KB
jquery.fancybox-thumbs.css 735B
jquery-ui-timepicker-addon.min.css 650B
bootstrapValidator.css 571B
jquery-ui-timepicker-addon.css 570B
bootstrapValidator.min.css 569B
glyphicons-halflings-regular.eot 20KB
tinymce-small.eot 10KB
tinymce.eot 10KB
fancybox_loading@2x.gif 14KB
fancybox_loading.gif 6KB
processing.gif 3KB
devoops_getdata.gif 3KB
loader.gif 3KB
select2-spinner.gif 2KB
loading.gif 2KB
3.gif 753B
0.gif 742B
2.gif 582B
1.gif 369B
smiley-cool.gif 354B
smiley-wink.gif 350B
smiley-smile.gif 344B
smiley-laughing.gif 343B
smiley-foot-in-mouth.gif 342B
smiley-frown.gif 340B
smiley-kiss.gif 338B
smiley-surprised.gif 338B
smiley-undecided.gif 337B
smiley-innocent.gif 336B
smiley-yell.gif 336B
smiley-embarassed.gif 331B
smiley-cry.gif 329B
smiley-tongue-out.gif 328B
smiley-sealed.gif 323B
smiley-money-mouth.gif 321B
object.gif 152B
edit.gif 145B
dragIconBlack.gif 122B
dragIcon.gif 122B
dragIconH.gif 111B
dragIconHBlack.gif 111B
anchor.gif 53B
blank.gif 43B
trans.gif 43B
index.html 41KB
roleadmin.html 10KB
useradmin.html 9KB
index.html 5KB
permissionadmin.html 5KB
login.html 2KB
unauthorized.html 1017B
errorcode.html 603B
errorusername.html 603B
locked.html 603B
errorpassword.html 600B
dialog.html 213B
norule2.html 61B
norule.html 52B
UserController.java 5KB
RoleController.java 3KB
UserServiceImpl.java 3KB
MyDataSource.java 3KB
PermissionController.java 2KB
WebSecurityConfig.java 2KB
RoleServiceImpl.java 2KB
UserRealm.java 2KB
PermissionServiceImpl.java 2KB
CorsConfig.java 1KB
UserService.java 1KB
Role.java 1KB
Swagger2.java 1KB
共 662 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
飞翔的佩奇
- 粉丝: 3556
- 资源: 799
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功