网站首页
关于深山
客户案例
业务范围
联系深山
网络投票系统
企业网站建设
旅行社网站建设
小程序
留言板
技术文章
许愿墙(qq爱墙)
技术首页
百度小程序开发
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
asp.net
DIV+CSS
HTML
SEO搜索引擎忧化
下载类信息
个人空间
代码生成
电商
python
页面特效
表格特效
导航菜单
图形特效
表单特效
时间日期
色彩类别
链接特效
网页特效
系统硬件
网站公告
网页学习
技术类文章
网站类信息
订阅本栏目 RSS
您所在的位置:
深山工作室
>
页面特效
> 正文
Google的265导航站上顶部右边的logo上的眼珠特效 (兼容IE,FF)
深山行者个人网站 2010/2/8 11:03:55 深山行者 字体:
大
中
小
浏览 11497
以上是所用的一些图片
google_265_logo_ig.js
以上是用到的JS代码
以下为详细代码
<html> <head> <meta http-equiv="content-type" content="text/html; charset=gb2312"> <title>Google的265导航站上顶部右边的logo上的眼珠特效 (兼容IE,FF)</title> <script src="/UploadFiles/demo/google_265_logo_ig.js"></script> </head> <body> <table cellpadding=0 cellspacing=0 border=0 align=center style="margin-top:200px;"> <tr> <td background="./UploadFiles/20100208/20100208110631979.gif"> <div style="width:117px;height:117px;"> <img src="./UploadFiles/20100208/20100208110639384.gif" width="15" height="15" style="position:relative;left:52px;top:52px;" id="EYES_pupil030"> </div> </td> <td background="./UploadFiles/20100208/20100208110622150.gif"> <div style="width:117px;height:117px;"> <img src="./UploadFiles/20100208/20100208110639384.gif" width="15" height="15" style="position:relative;left:52px;top:52px;" id="EYES_pupil130"> </div> </td> </tr> </table> <script type="text/javascript"> <!-- With thanks to Keith Packard and Jeremy Huxtable and Dylan Parker --> var EYES30 = { MAX_DIST : 37, // furthest pupil can move from center EYE_RADIUS : 59, // half the width of the eye image PUPIL_RADIUS : 7, // half the width of the pupil image pupils : [], init : function() { var app = EYES30; // setup our mousemove handler if (document.addEventListener) { document.addEventListener("mousemove", app.moveEyes, true); } else if (document.attachEvent) { document.attachEvent("onmousemove", app.moveEyes); } // grab references to the pupils app.pupils = [ _gel("EYES_pupil030"), _gel("EYES_pupil130") ]; // Call uninit when leaving page to cleanup the handlers _IG_AddEventHandler("unload", app.uninit); }, uninit : function() { var app = EYES30; // clean up our handlers if (document.addEventListener) { document.removeEventListener("mousemove", app.moveEyes, true); } else if (document.attachEvent) { document.detachEvent("onmousemove", app.moveEyes); } }, moveEyes : function(e) { if (!e) e = window.event; var app = EYES30; for (var i = 0; i < app.pupils.length; i++) { var pupil = app.pupils[i]; // The middle points of the eyes var midx = app.getPagePos(pupil.parentNode,true) + app.EYE_RADIUS; var midy = app.getPagePos(pupil.parentNode,false) + app.EYE_RADIUS; // The distX/distY from eye middles to the mouse var distX = e.clientX + document.body.scrollLeft - midx; var distY = e.clientY + document.body.scrollTop - midy; // The absolute distance from eye middles to the mouse var dist = Math.sqrt(Math.pow(distX, 2) + Math.pow(distY, 2)); if (dist > app.MAX_DIST) { // mouse out of eyeball, scale distX/distY to be at eyeball edge var scale = app.MAX_DIST / dist; distX *= scale; distY *= scale; } // Place the pupil appropriately pupil.style.left = parseInt(distX + app.EYE_RADIUS - app.PUPIL_RADIUS) + "px"; pupil.style.top = parseInt(distY + app.EYE_RADIUS - app.PUPIL_RADIUS) + "px"; } }, // get page coords for an element getPagePos : function(el, left) { var val=0; while(el != null) { val += el["offset"+(left?"Left":"Top")]; el = el.offsetParent; } return val; } }; EYES30.init(); </script> <!--[if lt IE 7]><script>if (typeof remote_modules == "undefined" && _gel("remote_30") != null) {_gel("remote_30").style.width = document.body.clientWidth + "px";}</script><![endif]-->如果眼睛没有动,请刷新页面,JS文件可能没有加载. </body> </html>
前一页:
按钮复制文章URL和复制保留文章的版权
后一页:
收集各种游览器禁止javascript的方法
相关阅读
连云港红发廊
windows8的iis7应用程序池标识问题
网页小键盘/软键盘
Instagram 广告投放操作与技巧
景点门票预订
asp中最难发现的错误由最简单的程序引起
四川省中国青年旅行社有限公司高新分社
CSS光标属性一览表
更多信息>>
栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
DIV+CSS
HTML
python
更多>>
同类信息
jquery下拉到某个固定位置然后某些元素发生改变样式状态
canvas绘制的文字如何换行
兼容pc、移动端用js实现复制内容到剪切板(支持苹果safari浏览器)
js兼容多个浏览器右下角漂浮广告
兼容ie6+和火狐的禁止右键
做在线客服时,聊天窗口的div滚动条始终在底部
更多>>
最新添加文章
dw里面查找替换使用正则删除sqlserver里面的CONSTRAINT
Android移动端自动化测试:使用UIAutomatorViewer与Selenium定位元素
抖音直播音挂载小雪花 懂车帝小程序
javascript获取浏览器指纹可以用来做投票
火狐Mozilla Firefox出现:无法载入您的Firefox配置文件 它可能已经丢失 或是无法访问 问题解决集合处理办法
在Android、iOS、Windows、MacOS中微信小程序的文件存放路径
python通过代码修改pip下载源让下载库飞起
python里面requests.post返回的res.text还有其它的吗
更多>>
随机抽取信息
湖南乐途旅行社
仙美境
旅行社网站模板默认风格2
利ASP里的FOS导出WORD或Excel文档(本人测试成功)
利用asp正则功能去除网页中自定义HTML标记(来自eWebEditor)
深山行者留言系统V3.3发布
更多标签
热门标签
windows
强聊
过期
hack
dreawmeaver
统计
梦幻
文件大小
格式
动画
定制
上一页
media
DIV+CSS做的透明菜单兼容IE、FF等
路径
框架
函数
文化
创建
九宫格
mssql
浮动对象
box
ie6
overflow
PSD
access
教程
收藏
三级
优化
关键字
列表
txt
lightbox
Java
CSS规范
位置
FSO
论坛
告
asasds
ewebeditor
购物
名称
title
指向
底部
搜索引擎
刷新
免责声明:本站所有资料信息,有部分为本人原创,部分为从网络收集而来,仅供网友查看阅读所用,所有信息版权归信息所有人或所有公司所有
如果信息内容侵犯到您的版权或权益请与我们联系,经确认后我们会立即移除相关内容或链接
Copyright © 2007-2026
深山工作室
All Rights Reserved
服务QQ:
565449214
手机:
13961347334
ICP备案:
苏ICP备15019627号
苏公网安备 32070502010230号