爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
仿QQ空间图片展示效果
仿QQ空间图片展示效果
日期:2014-05-18 浏览次数:20539 次
以下是程序代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>仿QQ空间图案片展示效果</title> <style type="text/css"> html, body {height:100%;margin:0px;padding:0px;background:url(http://zf4uc1.chinaw3.com/img/images/bg.jpg);} .box {width:850px;height:auto;overflow:hidden;margin:30px auto;background:#666;padding:10px 0 0 10px;} .box ul {margin:0px;padding:0px;float:left;list-style-type:none;} .box li {width:150px;height:100px;float:left;cursor:pointer;display:inline;margin:0 10px 10px 0;border:5px solid #333;} #bg {width:100%;height:100%;position:absolute;left:0px;top:0px;background:#000;filter:alpha(opacity:50);opacity:0.5;display:none;} #bottom {width:215px;height:50px;position:absolute;left:50%;bottom:0px;margin:0 0 0 -107px;border:1px solid #232323;background:#444;padding:1px;z-index:1;display:none;} #bottom ul {width:100%;height:100%;margin:0px;padding:0px;list-style-type:none;background:#000;} #bottom li {background:url(http://zf4uc1.chinaw3.com/img/images/ico.jpg) no-repeat;float:left;display:inline;margin:8px 0 0 18px;cursor:pointer;} #bottom li.prev {width:30px;height:33px;background-position:0 0;} #bottom li.next {width:30px;height:33px;background-position:-35px 0;} #bottom li.img {width:30px;height:33px;background-position:-106px 0;} #bottom li.close {width:31px;height:33px;background-position:-70px 0;} #frame {background:#fff;padding:3px;position:absolute;z-index:2;display:none;filter:alpha(opacity:0);opacity:0; text-align:center;} </style> <script type="text/javascript"> function getStyle(obj, attr) { return obj.currentStyle?obj.currentStyle[attr]:getComputedStyle(obj, false)[attr]; } window.onload = function(){ var oBox = document.getElementById('box'); var oBg = document.getElementById('bg'); var oBot = document.getElementById('bottom'); var aBli = oBot.getElementsByTagName('li'); var oFrame = document.getElementById('frame'); var aLi = oBox.getElementsByTagName('li'); var aImg = oBox.getElementsByTagName('img'); var i = iNow = 0; for(i=0;i<aLi.length;i++){ aLi[i].index = i; aLi[i].onclick = function(){ with(oFrame.style){display = 'block',top = this.offsetTop +'px',left = this.offsetLeft +'px',width = this.offsetWidth +'px',height = this.offsetHeight +'px';} oFrame.innerHTML = '<img src="http://zf4uc1.chinaw3.com/img/images/'+(this.index + 1)+'.jpg" />'; var oImg = oFrame.getElementsByTagName('img')[0]; var iWidth = oImg.width; var iHeight = oImg.height; var iLeft = parseInt((document.documentElement.clientWidth / 2) - (iWidth /2)); var iTop = parseInt((document.documentElement.clientHeight / 2) - (iHeight /2) - 50); with(oImg.style){height = width = '100%';} startMove(oFrame, {opacity:100, left:iLeft, top:iTop, width:iWidth, height:iHeight}); oBg.style.display = 'block'; oBot.style.display = 'block'; iNow = this.index + 1; }; } document.onmousedown = function(){ return false }; aBli[0].onclick = function(){ iNow--; if(iNow == 0)iNow = aLi.length; oFrame.innerHTML = '<img src="http://zf4uc1.chinaw3.com/img/images/'+iNow+'.jpg" width="100%" height="100%" />'; }; aBli[1].onclick = function(){ oFrame.style.cursor = 'move'; oFrame.onmousedown = function(e){ var oEvent = e || event; var X
上一篇:狡猾的按钮特效
下一篇:分享一个图片切割多块的效果
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
小米发明的“低价抢购”模式还能管用多久?
独立工具APP:为亿级用户的商业化而愁
支付宝被曝严重破绽 隐私平安再受质疑
全球五大电信设备商业绩:华为净利居首
中移动五大基地将整改成公司:被指易滋生腐败
探析APP移动营销发扬实效的微妙
同程旅游融资后变土豪 如何烧钱占领市场?
火一把就死: 百度魔图验证社交游戏衰亡宿命
微博启动自媒体计划 粉丝+收入双激励是亮点
推荐阅读
更多>
充斥着假消息负能量的“秘密”缺乏普适性
京东很忙:升服务推产品更新招股书 能赶在阿里前上市?
微软史上最大规模裁员,一半诺基亚员工
移动联通回应税率改革:短期内收入利润将大减
传360周鸿祎曾试图阻止百度收购91无线
评论:阿里为什么不试着收购一家香港媒体呢
电信运营商员工涌入虚拟运营商,待遇差距多大?
“世界杯+618”集体磨刀的本质是绑架全民
NEC拟出售移动效劳子公司NEC Mobile
“宽带中国”计划已正式上升为国家战略
iPhone5S组件曝光 印证杀手级功能存在
苹果优势逐渐丧失 传即将推出廉价iPhone
虚拟运营商们更像三大运营商的“二道贩子”
十亿美元的告别礼:三星为何要大举重组?
小微型IDC云化趋势加剧 云计算未来或现终极模式
支付宝全面封杀比特币:充值码淘宝店或遭封禁
雷军会做赔钱生意?迅雷跌破发行价 市值仅7亿美元
迅雷欲3300万美元收购金山快盘 预计9月完成
9月1日起免征新能源汽车购置税
让一让,小米4来了,碰见米粉请务必绕道走!