图片翻转效果具体实现代码
代码 实现 图片 效果 具体 翻转
2023-06-13 09:15:15 时间
以下为程序代码:
复制代码代码如下:
<!DOCTYPEhtml/>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
<metahttp-equiv="X-UA-Compatible"content="IE=EmulateIE7"/>
<title>图片翻转效果</title>
<styletype="text/css">
.box{overflow:hidden;position:relative;}
.txt{width:100%;height:100%;background:#f51146;font-size:12px;position:absolute;top:-100%;color:white;
text-align:center;filter:alpha(Opacity=80);-moz-opacity:0.8;opacity:0.8;}
#b1{background:url(http://biyuan.tk/u/upload/201310221457326875.jpg);width:232px;height:232px;}
#b2{background:url(http://biyuan.tk/u/upload/201310221457486875.jpg);width:110px;height:110px;}
#b3{background:url(http://biyuan.tk/u/upload/201310221458149843.jpg);width:110px;height:110px;}
</style>
</head>
<body>
<divid="obj">
<divclass="box"id="b1"><divclass="txt">文字说明<br/>文字说明</br/>文字</div></div>
<divclass="box"id="b2"><divclass="txt">文字说明<br/>文字说明</br/>文字</div></div>
<divclass="box"id="b3"><divclass="txt">文字说明<br/>文字说明</br/>文字</div></div>
</div>
<scripttype="text/javascript">
functionShow(o,s,v){
clearInterval(Show.prototype["a"+v]);
Show.prototype["a"+v]=setInterval(function(){
if(s==-1){
if(o.offsetTop<=-o.parentNode.offsetHeight){
o.style.top=-o.parentNode.offsetHeight+"px";
returnclearInterval(Show.prototype["a"+v]);
}
}else{
if(o.offsetTop>=-10){
o.style.top=0;
returnclearInterval(Show.prototype["a"+v]);
}
}
o.style.top=(o.offsetTop*1+10*s)+"px";
},10);
}
varigs=document.getElementById("obj").getElementsByTagName("div");
for(vari=0;i<igs.length;i++){
if(igs[i].className=="box"){
(function(x){
igs[x].onmouseover=function(){
Show(this.childNodes[0],1,x);
this.onmouseout=function(){
Show(this.childNodes[0],-1,x);
}
}
})(i);
}
}
</script>
</body>
</html>
效果预览:http://biyuan.tk/u/upload/201310221500310000.html
相关文章
- jquery实现轮播图_用jquery实现图片轮播图代码
- 9个Python 内置装饰器: 显著优化代码
- WPF使用AvalonEdit实现代码高亮显示、搜索、替换功能
- Node.JS中调用JShaman接口,实现JS代码加密
- 实现了一个PHP5的getter/setter基类的代码
- js实现用滚动条来放大缩小图片的代码
- checkbox全选/取消全选以及checkbox遍历jQuery实现代码
- jquery批量上传图片实现代码
- jquery插件实现图片延迟加载效果代码
- JavaScriptTimer实现代码
- PHPMemcached+APC+文件缓存封装实现代码
- php下将图片以二进制存入mysql数据库中并显示的实现代码
- jQuery的实现原理的模拟代码-5Ajax
- jquery异步循环获取功能实现代码
- 基于jquery实现的上传图片及图片大小验证、图片预览效果代码
- 简短几句jquery代码的实现一个图片向上滚动切换
- 最简单的js图片切换效果实现代码
- jQuery点击后一组图片左右滑动的实现代码
- Android裁剪图片为圆形图片的实现原理与代码
- JavaScript实现网页图片等比例缩放实现代码及调用方式
- jquery打开直接跳到网页最下面、最低端实现代码
- php采集文章中的图片获取替换到本地(实现代码)
- php读取图片内容并输出到浏览器的实现代码
- JS返回上一页实例代码通过图片和按钮分别实现
- JS实现图片横向滚动效果示例代码
- JSP跨iframe如何传递参数实现代码
- 基于JQuery的列表拖动排序实现代码
- jQuery判断checkbox(复选框)是否被选中以及全选、反选实现代码