爱易网
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 浏览次数:20299 次
以下是程序代码
<!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
上一篇:狡猾的按钮特效
下一篇:分享一个图片切割多块的效果
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
IT时代周刊总编辑曹健:投资人刘志硕印象记
优酷土豆携手新浪微博 谋攻移动视频失地
170号码扎堆上市:手机话费私人定制时代到来?
迅雷再次在美提交IPO申请
诺基亚再缩阵线 封锁上海旗舰店全力蜕变
中国移动承诺再降4G资费 网络漫游至50个国家
罗永浩工匠形象坍塌,锤子产能再跳水逃离用户超两成
中移动推动感地带3G网聊卡 火拼微信沃卡
联想国庆完成收购IBM x86服务器
推荐阅读
更多>
惠普中国转型只是缩影 未来开展不可预期
为啥苹果定要出廉价iPhone?都是安卓逼的
谷歌安卓全球副总裁为何跳槽中国企业小米?
锐迪科将以9.25美元/ADS价钱出售835万份ADS
唯品会股价飙升 引天猫当当京东进军闪购
O2O成"唐僧肉":百度糯米抢食第一口令阿里腾讯颤抖
北京电信推“0月租卡”,同网通话免费
欧洲6万人起诉Facebook隐私侵权
搜狐与奇虎360或结盟对抗BAT
苏宁双线同价遇难题:第一个吃螃蟹不轻松
凑足了升级ios8所需要的5.7G空间,没料到“苹果”却变成“板砖”,iOS8还能一起愉快玩耍吗?
电话用户9月实名制:运营商监管受质疑
FB上广告费用昂贵而且效果不及Twitter
传苹果中移动达成协议:新iPhone兼容TD制式
团购网站存活率仅18.6% 剩余缺乏千家
用友软件股价逆势下跌 再融资方案现曙光
从3G牌照发放看中国4G规划效果
微软提示XP只剩365天寿命:用户被绑架?
盛大游戏走向衰落的根源:免费游戏模式惹的祸
刘强东:京东上市融资用于开拓三至六线城市