爱易网
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 浏览次数:20576 次
以下是程序代码
<!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
上一篇:狡猾的按钮特效
下一篇:分享一个图片切割多块的效果
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
雅安地震 绝不宽恕应用人们爱心的骗子!
高通拼抢国际芯片市场 联发科海外拓展难安心
国内首个大数据系列指数今日发布
网络视频的几大趋势将成视频玩家躲不开的发力点
中移动五大基地将整改成公司:被指易滋生腐败
2018双11阿里云老用户怎么参加拼团活动 老用户拼团方法
马云的SNS之梦有了新目标 收购“微博”
苹果音乐效劳新战略:与唱片商停止流媒体协作
传搜狗估值12亿美元 与360谈判进入白热化
推荐阅读
更多>
湘鄂情剥离餐饮业务进军大数据的底气在哪里?
互联网金融一周年:余额宝最接地气,比特币最作死
网友爆料称微软雇水军宣传主机Xbox One
京东确定IPO定价区间 最高募资16.9亿美元
分析称iPhone 6明年初发布 屏幕变为4.8吋
小灵通两年都无信号 顾客起诉联通公司
百视通:Xbox One汉化获批 游戏迷欢呼吧
苹果音乐效劳新战略:与唱片商停止流媒体协作
新浪微博推粉丝头条功能 意欲与大号分成
英特尔技术高管离任 电视业务或受影响
苹果30亿美元收购Beats
国网公司将加快组建 业界人士称困难重重
AMD Q1净亏1.46亿美元 转战SOC拥抱ARM求变
组建铁塔公司倒逼运营商改革 或加速4G网建设
支付宝服务窗后台首曝光 开放用户消费数据
微博启动自媒体计划 粉丝+收入双激励是亮点
首批四款“官方”打车软件发布:均为安卓版本
传三星为赢得新兴市场:推廉价版Note3
孙正义入股阿里往事还原:阿里巴巴并非软银首选
一个非脑残米粉的思考:小米“成功之道”如何炼成