爱易网
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 浏览次数:20551 次
以下是程序代码
<!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
上一篇:狡猾的按钮特效
下一篇:分享一个图片切割多块的效果
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
薛蛮子取保后首次发微博表示:辜负你们了
工商总局开查电商“七日退货”
亚马逊推特价闪购纪念入华十周年 总裁一职仍空缺
开个房刷个卡全世界都知道个人隐私成公开秘密
中兴引进黑莓三个核心团队
摩托罗拉中国区将再裁员 助力公司变身
SAP高层调整:联席CEO孟鼎铭成唯一掌舵人
中电信率先推移动转售业务 中下旬批量上市
苹果收购Beats交易或将延期尚需解决5大问题
推荐阅读
更多>
MIUI,有了它小米就无惧对手
锐迪科将以9.25美元/ADS价钱出售835万份ADS
薛蛮子取保后首次发微博表示:辜负你们了
中国首台比特币ATM登陆上海 可购买不可兑换现钞
FDD牌照12月将发放 联通电信双4G反击中移动
任正非:华为决不上市 上市公司股东贪婪而短视
传诺基亚5月14日发布会推出Lumia 950
郭美美事件推手被抓 “秦火火”拷问网络底线
携程艺龙联手死磕同程 价钱烽烟蔓延至机票
固话上网卡或将实名制 运营商泄露用户信息将被罚
广东移动高层受调查 中移动或现更大反腐风暴
雷军收买腾讯金山股份:持股比例升至27%
微软与摩托罗拉授权协议涵盖Android和Chrome设备
亚马逊Fire Phone:请别拿我跟苹果三星比
苏宁易购成世界最慢电商 专家称其涉嫌违约
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
广电地方营业厅的一句“罚停”,暴露出了他们的本质
华为坚持不上市究竟为何?不差钱也不想冒风险
做大电影,阿里控股公司在港成立影业集团
京东封杀财付通:终极目标是电商生态圈