zoukankan
html css js c++ java
图片聚光灯效果
代码如下:
<style> #myimage{filter:light} body { background-color: #000000; } </style> <div id="myimg" align="center"> <img src="http://img.star.tfol.com/star/stars/1760/photos/M72353.jpg" id="myimage"> </div> <script language="JavaScript"> <!-- s = 50; // 聚光灯的大小 vp = 40; // 图片可见度 startx = 30; // the top position of your sportlight into the image (on start) starty = 30; // the left position of your spotlight into the image (on start) var IE = document.all?true:false function moveL() { xv = tempX; yv = tempY; myimage.filters.light.MoveLight(1,xv,yv,s,true); } if (IE&&myimage.filters) document.all.myimage.onmousemove = getMouseXY; var tempX = 0 var tempY = 0 function getMouseXY(e) { tempX = event.offsetX tempY = event.offsetY if (tempX < 0){tempX = 0} if (tempY < 0){tempY = 0} if (t) { moveL(); } return true } var xv = startx; var yv = starty; var t= true; if (IE&&myimage.filters){ myimage.style.cursor="hand"; myimage.filters.light.addAmbient(255,255,255,vp) myimage.filters.light.addPoint(startx,starty,s,255,255,255,255) } //--> </script>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
青苹果Web应用商店
https://webapp.taobao.com/
PHP/ASP.NET/ASP/UCHOME/DISCUZ! X系列网站开发,详细需求联系
QQ:8511978
查看全文
相关阅读:
关于 __proto__和prototype的一些理解
使用siege进行web压力测试
Access denied for user 'root'@'localhost' (using password: YES)
博客搬家来咯
Permutation Transformer【Splay】
Prime Independence 【LightOJ
Power Sockets【CF 1469F】【线段树+贪心】
A Bit Similar【CF 1469E】【unordered_map+bitset】
brz的树【牛客练习赛72 F】【虚树+dfs序可持久化线段树+树上差分】
CCA的期望【牛客练习赛74】【数学】
原文地址:https://www.cnblogs.com/Dicky/p/309451.html
最新文章
Spring学习记录(十三)---基于xml文件配置AOP
Spring学习记录(十二)---AOP理解和基于注解配置
目录
gitlab ci
pom.xml settings.xml
Basic Auth
spring oauth Role and Authority and scope
Java注解
nc 查看端口是否 联通
Windows中搭建ftp服务器
热门文章
在linux下使用curl
perl
nginx 用法
mac os reset mysql password
命名函数表达式揭秘
多行文本截断
浏览器 CSS Hack 收集
FreeBSD上构架Nginx服务器
github上值得关注的前端项目
android 4.4.3 css hack 写法
Copyright © 2011-2022 走看看