南强小屋 Design By 杰米
点击图片,图片拉伸放大显示,效果非常棒!
使用方法:
1、head区域引用文件 jquery.js,photorevealer.js,datouwang.css
2、在文件中加入<!-- 代码 开始 --><!-- 代码 结束 -->区域代码
3、图片个数可以自由增减,增加或者删除<td></td>即可
4、如果图片信息更多,需要更大的空间,可修改photorevealer.js中第36行的数字
核心代码:
$(document).ready(function(){
$('.photo_slider').each(function(){
var $this = $(this).addClass('photo-area');
var $img = $this.find('img');
var $info = $this.find('.info_area');
var opts = {};
$img.load(function(){
opts.imgw = $img.width();
opts.imgh = $img.height();
});
opts.orgw = $this.width();
opts.orgh = $this.height();
$img.css ({
marginLeft: "-150px",
marginTop: "-150px"
});
var $wrap = $('<div class="photo_slider_img">').append($img).prependTo($this);
var $open = $('<a href="#" class="more_info">More Info ></a>').appendTo($this);
var $close = $('<a class="close">Close</a>').appendTo($info);
opts.wrapw = $wrap.width();
opts.wraph = $wrap.height();
$open.click(function(){
$this.animate({
width: opts.imgw,
height: (opts.imgh+30),
borderWidth: "10"
}, 600 );
$open.fadeOut();
$wrap.animate({
width: opts.imgw,
height: opts.imgh
}, 600 );
$(".info_area",$this).fadeIn();
$img.animate({
marginTop: "0px",
marginLeft: "0px"
}, 600 );
return false;
});
$close.click(function(){
$this.animate({
width: opts.orgw,
height: opts.orgh,
borderWidth: "1"
}, 600 );
$open.fadeIn();
$wrap.animate({
width: opts.wrapw,
height: opts.wraph
}, 600 );
$img.animate({
marginTop: "-150px",
marginLeft: "-150px"
}, 600 );
$(".info_area",$this).fadeOut();
return false;
});
});
});
以上所述就是本文的全部代码了,希望大家能够喜欢。
南强小屋 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
南强小屋 Design By 杰米
暂无jQuery图片特效插件Revealing实现拉伸放大的评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。