本站导航
网络投票系统
企业网站建设
小程序
旅行社网站建设
留言板
首页
网站地图
网站首页
技术文章
客户案例
联系方式
信息搜索
深山工作室
>
Google的265导航站上顶部右边的logo上的眼珠特效 (兼容IE,FF)
以上是所用的一些图片
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>
前一页:
收集各种游览器禁止javascript的方法
后一页:
按钮复制文章URL和复制保留文章的版权
相关阅读
chrome谷歌浏览器中的谷歌翻译有问题一键修复处理
越狱ios老应用老游戏合集下载
静态生成
全部功能介绍
深山留言板5.0新版
Google的265导航站上顶部右边的logo上的眼珠特效 (兼容IE,FF)
ASP汉字转拼音,支持自定义特殊词语
告诉你一些GOOGLE搜索你不知道的东西
更多>>
页面特效相关信息
jquery下拉到某个固定位置然后某些元素发生改变样式状态
canvas绘制的文字如何换行
兼容pc、移动端用js实现复制内容到剪切板(支持苹果safari浏览器)
js兼容多个浏览器右下角漂浮广告
兼容ie6+和火狐的禁止右键
更多>>
最新添加
dw里面查找替换使用正则删除sqlserver里面的CONSTRAINT
Android移动端自动化测试:使用UIAutomatorViewer与Selenium定位元素
抖音直播音挂载小雪花 懂车帝小程序
javascript获取浏览器指纹可以用来做投票
火狐Mozilla Firefox出现:无法载入您的Firefox配置文件 它可能已经丢失 或是无法访问 问题解决集合处理办法
百度小程序开发
HTML
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
下载类信息
DIV+CSS
个人空间
代码生成
SEO搜索引擎忧化
asp.net
电商
python
页面特效
表格特效
导航菜单
图形特效
表单特效
时间日期
色彩类别
链接特效
网页特效
系统硬件
网站公告
网页学习
技术类文章
网站类信息
旅行社网站案例
旅行社微信案例
头条抖音小程序案例
百度小程序案例
微信小程序案例
小程序案例
旅行社网站案例
投票案例
企业网站建设案例
Copyright ©
深山工作室
All Rights Reserved
服务QQ:
565449214
手机:
13961347334
ICP备案:
苏ICP备15019627号
苏公网安备 32070502010230号
网站首页
业务范围
服务案例
投票系统
联系方式
电话联系
二维码展示