以下为程序代码:
复制代码 代码如下:
<!DOCTYPE html />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>图片翻转效果</title>
<style type="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>
<div id="obj">
<div class="box" id="b1"><div class="txt">文字说明<br />文字说明</br />文字</div></div>
<div class="box" id="b2"><div class="txt">文字说明<br />文字说明</br />文字</div></div>
<div class="box" id="b3"><div class="txt">文字说明<br />文字说明</br />文字</div></div>
</div>
<script type="text/javascript">
function Show(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";
return clearInterval(Show.prototype["a" + v]);
}
} else {
if(o.offsetTop >= -10) {
o.style.top = 0;
return clearInterval(Show.prototype["a" + v]);
}
}
o.style.top = (o.offsetTop * 1 + 10 * s) + "px";
}, 10);
}
var igs = document.getElementById('obj').getElementsByTagName("div");
for(var i = 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
标签:
图片翻转

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com

评论“图片翻转效果具体实现代码”

暂无“图片翻转效果具体实现代码”评论...

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。