jQuery Capty 图片标题插件
jQuery Capty是可以为图片添加漂亮的字幕的插件
文件包含:
<link type="text/css" rel="stylesheet" href="/capty/css/jquery.capty.css"/>
<script type="text/javascript" src="/capty/js/jquery.js"></script>
<script type="text/javascript" src="/capty/js/jquery.capty.min.js"></script>
调用方法:
实例1:图片的alt标签默认被应用于标题内容
<img id="default" src="data:image.jpg" alt="Super Mario Bros.®" width="342" height="262"/>
$('#default').capty();
实例2:自定义动画和速度
<img id="animation" src="data:image.jpg" alt="Super Mario Bros.®" width="342" height="262"/>
$('#animation').capty({
animation: 'fade',
speed: 400
});
实例3:固定标题
<img id="fixed" src="data:image.jpg" alt="Super Mario Bros.®" width="342" height="262"/>
$('#fixed').capty({
animation: 'fixed'
});
实例4:自定义标题与外部扩展内容
<img id="content" src="data:image.jpg" name="#content-target" width="342" height="262"/> <div id="content-target">
<span style="color: #F00;">Mario</span> - Super Mario Bros.®<br/>
<a href="javascript:void(0);">http://www.mariobros.com</a>
</div>
$('#content').capty({
height: 46,
opacity: .6
});
实例5:用后缀,前缀和一个自定义的风格应用于一组元素
<img src="data:image-1.jpg" class="fix" width="240" height="161"/>
<img src="data:image-2.jpg" class="fix" width="240" height="161"/>
<img src="data:image-3.jpg" class="fix" width="240" height="161"/>
$('.fix').capty({
cWrapper: 'capty-tile',
prefix: '<span style="color: #35BB87">Luigui</span>',
sufix: 'Super Mario Bros.®'
});
默认设置选项
animation: 'slide'
The captions animation type: 'slide', 'fade' or 'fixed'.
cCaption: 'capty-caption'
The class name of the wrapper caption.
cImage: 'capty-image'
The class name of the wrapper image.
cWrapper: 'capty-wrapper'
The class name of the wrapper image and caption.
height: 30
The height of the caption.
opacity: .7
The opacity of the caption.
prefix: ''
The text/html that will be applied at the beginning of the legend.
speed: 200
The speed in which caption will appear and disappear.
sufix: ''
The text/html that will be applied at the end of the caption.
jQuery Capty 图片标题插件的更多相关文章
- 推荐几款jquery图片切换插件
一.前言 毕业季到了,大家都在匆匆忙忙的记录大学里最美好的时光,照片中各种花式.各种姿势都涌现出来了.这么多的照片怎么展示出来给自己的好友看呢?有人选择做成视频,有人选择ps之后做成图片集,而我选择利 ...
- 提升用户体验的最佳免费 jQuery 表单插件
网页表单是一个老生常谈的话题.出于这样或那样的目的,一些示例中都会包括用户注册,电子商务结算,用户设置甚至联系人表格.而输入栏是非常容易用现代的CSS3技术来应用样式.但是到底什么决定整体用户体验? ...
- jQuery为开发插件提拱了两个方法:jQuery.fn.extend(); jQuery.extend();
jQuery为开发插件提拱了两个方法,分别是: jQuery.fn.extend(); jQuery.extend(); jQuery.fn jQuery.fn = jQuery.prototype ...
- jQuery 人脸识别插件,支持图片和视频
jQuery Face Detection 是一款人脸检测插件,能够检测到图片,视频和画布中的人脸坐标.它跟踪人脸并输出人脸模型的坐标位置为一个数组.我们相信,面部识别技术能够给我们的 Web 应用带 ...
- myWaterfall - jQuery瀑布流布局插件
myWaterfall - jQuery瀑布流布局插件 Demo http://jsfiddle.net/q3011893/p5k2ogy8/embedded/result,html,css,js/ ...
- 推荐15款最佳的 jQuery 分步引导插件
当用户浏览到一个网站,它可能从不知道如何浏览,如何操作网站或 Web 应用程序的内容和流程.在这篇文章中,我们编制了一些最好的 jQuery 引导插件列表.你会发现这些插件对于提高你的网站的整体用户体 ...
- Cropper – 简单的 jQuery 图片裁剪插件
Cropper 是一个简单的 jQuery 图像裁剪插件.它支持选项,方法,事件,触摸(移动),缩放,旋转.输出的裁剪数据基于原始图像大小,这样你就可以用它们来直接裁剪图像. 如果你尝试裁剪跨域图像, ...
- 一款简洁大气的jquery日期日历插件
本jquery插件名为manhuaDate,暂时只支持jquery 1.9.0以下版本,比如jquery-1.8.3.min.js 查看效果网址:http://keleyi.com/a/bjad/em ...
- 使用requireJS的shim参数 解决插件 jquery.ui 等插件问题
没有requireJS框架之前,如果我们想使用jquery框架,会在HTML页面中通过<script>标签加载, 这个时候jquery框架生成全局变量$和jQuery等全局变量.如果项目中 ...
随机推荐
- JDK源码阅读(三) Collection<T>接口,Iterable<T>接口
package java.util; public interface Collection<E> extends Iterable<E> { //返回该集合中元素的数量 in ...
- document.body.clientWidth vs document.documentElement.clientWidth
http://blog.csdn.net/zb0567/article/details/7182391 mobile web javascript library http://www.gbin1.c ...
- Git如何Check Out出指定文件或者文件夹
原文 http://www.handaoliang.com/a/20140506/195406.html 在进行项目开发的时候,有时候会有这样的需求那就是:我们只希望从Git仓库里取指定的文件或者文 ...
- Android程序的隐藏与退出
转自Android程序的隐藏与退出 Android的程序无需刻意的去退出,当你一按下手机的back键的时候,系统会默认调用程序栈中最上层Activity的Destroy()方法来销毁当前Activit ...
- MySQL中group_concat函数,用符号连接查询分组里字段值
http://blog.csdn.net/my_yang/article/details/7186844
- 在XP系统中自带的 msvcrt.dll 和 Vista 中的 msvcrt.dll 版本不同,导致抛出的异常不同
然而,在XP系统中,系统自带的 msvcrt.dll 和 Vista 中的 msvcrt.dll 版本不同, 并没有这个 _except_handler4_common ,结果就出现了启动程序时,遇到 ...
- 【HDOJ】4902 Nice boat
区间线段树.题目还不错. /* */ #include <iostream> #include <string> #include <map> #include & ...
- java学习面向对象之异常之二
我们知道当我们处理异常的时候,一个是声明,另外一个是捕捉. 捕捉:异常处理的捕捉方式,这是可以对异常进行针对性处理的方式.具体格式是: try { //需要被检测的异常 } catch(异常类 变量) ...
- Android学习笔记(二)Manifest文件节点详解
在上一篇博文中简单介绍了Manifest文件及其存放位置,本篇就来详细介绍一下Manifest文件中的节点和一些节点的基本作用,首先看一下Manifest文件最基本的结构: <manifest ...
- (转载)ASP网站如何防止注入漏洞攻击
SQL注入是从正常的WWW端口访问,而且表面看起来跟一般的Web页面访问没什么区别,所以目前市面的防火墙都不会对SQL注入发出警报,如 果管理员没查看IIS日志的习惯,可能被入侵很长时间都不会发觉.但 ...