JS跟随鼠标飞舞的星星

<html>
    <head>
    <title>JS跟随鼠标飞舞的星星丨梨花粉价格|草坪销售</title>
    </head>
    <body><script language="JavaScript">
    if (!document.layers&&!document.all)
    event="test"
    function showtip2(current,e,text){
    if (document.all&&document.readyState=="complete"){
    document.all.tooltip2.innerHTML=‘<marquee style="border:1px solid black">‘+text+‘</marquee>‘
    document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft+10
    document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10
    document.all.tooltip2.style.visibility="visible"}
    else if (document.layers){
    document.tooltip2.document.nstip.document.write(‘<b>‘+text+‘</b>‘)
    document.tooltip2.document.nstip.document.close()
    document.tooltip2.document.nstip.left=0
    currentscroll=setInterval("scrolltip()",100)
    document.tooltip2.left=e.pageX+10
    document.tooltip2.top=e.pageY+10
    document.tooltip2.visibility="show"}}
    function hidetip2(){
    if (document.all)
    document.all.tooltip2.style.visibility="hidden"
    else if (document.layers){
    clearInterval(currentscroll)
    document.tooltip2.visibility="hidden"}}
    function scrolltip(){
    if (document.tooltip2.document.nstip.left>=-document.tooltip2.document.nstip.document.width)
    document.tooltip2.document.nstip.left-=5
    else
    document.tooltip2.document.nstip.left=150}
    </script>
    <script language="JavaScript">
    function YY_Layerfx(yyleft,yytop,yyfnx,yyfny,yydiv,yybilder,yyloop,yyto,yycnt,yystep) { //v1.2
    if ((document.layers)||(document.all)){
    with (Math) {yynextx= eval(yyfnx)}
    with (Math) {yynexty= eval(yyfny)}
    yycnt=(yyloop && yycnt>=yystep*yybilder)?0:yycnt+yystep;
    if (document.layers){
    eval(yydiv+".top="+(yynexty+yytop))
    eval(yydiv+".left="+(yynextx+yyleft))  }
    if (document.all){
    eval("yydiv=yydiv.replace(/.layers/gi, ‘.all‘)");
    eval(yydiv+".style.pixelTop="+(yynexty+yytop));
    eval(yydiv+".style.pixelLeft="+(yynextx+yyleft));  }
    argStr=‘YY_Layerfx(‘+yyleft+‘,‘+yytop+‘,"‘+yyfnx+‘","‘+yyfny+‘","‘+yydiv+‘",‘+yybilder+‘,‘+yyloop+‘,‘+yyto+‘,‘+yycnt+‘,‘+yystep+‘)‘;
    if (yycnt<=yystep*yybilder){eval(yydiv+".yyto=setTimeout(argStr,yyto)");} }}
    function YY_Mousetrace(evnt) {
    if (yyns4)
    {if (evnt.pageX) {yy_ml=evnt.pageX;  yy_mt=evnt.pageY;}  }
    else{
    yy_ml=(event.clientX + document.body.scrollLeft);
    yy_mt=(event.clientY + document.body.scrollTop);}
    if (yy_tracescript)eval(yy_tracescript)}
    </script>
    <script language="JavaScript">
    function PopWin()
    {
    var PopWin = window.open("new.htm","PopWin","toolbar=no,directries=no,scrollBars=yes,height=350,width=400");
    }
    </script>
    <div id="tooltip2" style="position:absolute;visibility:hidden;clip:rect(0 150 50 0);width:150px;background-color:lightyellow">
    <layer name="nstip" width="100%" bgColor="lightyellow">
    </layer>
    </div>
    <div id="yyd0"
    style="position:absolute; left:10px; top:50px; width:5px; height:5px; z-index:1; background-color: #19636c; layer-background-color: #19636c; border: 1px none #000000; clip: rect(0 5 5 0)"></div><div
    id="yyd1"
    style="position:absolute; left:20px; top:50px; width:5px; height:5px; z-index:1; background-color: #708574; layer-background-color: #708574; border: 1px none #000000; clip: rect(0 5 5 0)"></div><div
    id="yyd2"
    style="position:absolute; left:30px; top:50px; width:5px; height:5px; z-index:1; background-color: #379bbf; layer-background-color: #379bbf; border: 1px none #000000; clip: rect(0 5 5 0)"></div><div
    id="yyd3"
    style="position:absolute; left:40px; top:50px; width:5px; height:5px; z-index:1; background-color: #25184c; layer-background-color: #25184c; border: 1px none #000000; clip: rect(0 5 5 0)"></div><div
    id="yyd4"
    style="position:absolute; left:50px; top:50px; width:5px; height:5px; z-index:1; background-color: #31bd3c; layer-background-color: #31bd3c; border: 1px none #000000; clip: rect(0 5 5 0)"></div><div
    id="yyd5"
    style="position:absolute; left:60px; top:50px; width:5px; height:5px; z-index:1; background-color: #c11efd; layer-background-color: #c11efd; border: 1px none #000000; clip: rect(0 5 5 0)"></div><script>
    var yyns4=window.Event?true:false; var yy_mt = 0; var yy_ml = 0;
    document.onmousemove = YY_Mousetrace;
    yy_tracescript = ‘‘;
    if (yyns4){ document.captureEvents(Event.mousemove);
    YY_Mousetrace(‘‘,‘,document.YY_Mousetrace1‘)}
    YY_Layerfx(0,0,‘yy_ml+cos((15*sin(yycnt/39.83007847812662))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘yy_mt+sin((15*sin(yycnt/34.224861639800686))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘document.layers[\‘yyd0\‘]‘,2000,true,80,0,1);
    YY_Layerfx(0,0,‘yy_ml+cos((15*sin(yycnt/27.66510707209673))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘yy_mt+sin((15*sin(yycnt/9.240632767417667))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘document.layers[\‘yyd1\‘]‘,2000,true,80,0,1);
    YY_Layerfx(0,0,‘yy_ml+cos((15*sin(yycnt/16.45318944579641))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘yy_mt+sin((15*sin(yycnt/16.0564452288292))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘document.layers[\‘yyd2\‘]‘,2000,true,80,0,1);
    YY_Layerfx(0,0,‘yy_ml+cos((15*sin(yycnt/6.95348954836835))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘yy_mt+sin((15*sin(yycnt/44.13697049887155))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘document.layers[\‘yyd3\‘]‘,2000,true,80,0,1);
    YY_Layerfx(0,0,‘yy_ml+cos((15*sin(yycnt/33.90077294583733))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘yy_mt+sin((15*sin(yycnt/2.2378828869411587))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘document.layers[\‘yyd4\‘]‘,2000,true,80,0,1);
    YY_Layerfx(0,0,‘yy_ml+cos((15*sin(yycnt/37.858312521039835))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘yy_mt+sin((15*sin(yycnt/18.083839795990098))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)‘,‘document.layers[\‘yyd5\‘]‘,2000,true,80,0,1);
    </script>
    <p align="center" style="line-height: 20px">
    <font face="Arial, Helvetica, sans-serif" color="#666666"></font> 
    </body>
    </html>
    <br><br><hr>
    
时间: 2024-10-02 05:30:50

JS跟随鼠标飞舞的星星的相关文章

JS跟随鼠标旋转的图片

<html> <head> <title>JS跟随鼠标旋转的图片丨Daniel wellington</title> <script> <!-- Beginning of JavaScript - var x,y var step=5 var flag=1 var pause var timersmall var timerbig var isbigcircle=1 var pause=50 var bigradius var smallr

js跟随鼠标移动的写法

<script> window.onload=function(){ document.onmousemove=function (ev) { var oEvent=ev||event; var oDiv=document.getElementById('div1'); oDiv.style.left=oEvent.clientX+'px'; oDiv.style.top=oEvent.clientY+'px'; }; } </script> 不要忘记给跟随的标签设置绝对定位

分享一个很有意思的js,动态时钟显示,能跟随鼠标移动

原文:分享一个很有意思的js,动态时钟显示,能跟随鼠标移动 源代码下载地址:http://www.zuidaima.com/share/1550463688182784.htm

JS实现导航条效果——current跟随鼠标hover移动

<!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-

JS之鼠标跟随

需求:点击页面的任何地方,图片跟随鼠标移动到点击位置思路:获取鼠标在页面中的位置,然后图片缓慢运动到鼠标点击的位置(兼容ie6,7做pageY和pageX) <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body{ height: 5000px;

html5跟随鼠标炫酷网站引导页动画特效

html5跟随鼠标炫酷网站引导页动画特效一款非常不错的引导页,文字效果渐变,鼠标跟随出绚丽的条纹.html5炫酷网站引导页,鼠标跟随出特效. 体验效果:http://hovertree.com/texiao/html5/ 效果图: 以下是源代码: 1 <!DOCTYPE html> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Co

jQuery背景跟随鼠标移动的网页导航

首页 PSD模板 CSS模板 特效插件 源码下载 酷站欣赏 建站资源 建站教程 心境之旅 在线留言 设为首页 加入收藏 我要投稿 联系站长 Search 首页 PSD模板 CSS模板 特效插件 源码下载 酷站欣赏 建站资源 建站教程 心境之旅 在线留言 滚动图片 广告特效 选项卡特效 鼠标特效 表单按钮 表格图层 窗口特效 文字特效 色彩特效 图像特效 日期特效 导航菜单 在线客服 当前位置:模板网首页 > 特效插件 > 导航菜单 >  jQuery背景跟随鼠标移正文 jQuery背景跟

js实现鼠标拖拽div-------Day44

如果去问这样一个问题"你觉得鼠标操作简单,还是键盘操作简单",相信会有多数人都会回答鼠标吧,毕竟键盘按钮那么多,如果手小了或者手法不规范了,太容易出问题了,也对操作的速度和有效性是大大的降低了,当然不可否认,会有那么一批人,操作起键盘来完全可以忽略鼠标的,但这些都应该是骨灰级别的了吧,起码我现在的层次还接触不到,只能向往. 然而,当面对这么一个问题时,我突然有点纠结,因为毕竟以前我也是那么想的,但是这次开发让我是大跌眼镜,键盘操作我在开发中,我只能判定其按键是否按键,然后根据不同按键进

一款基于TweenMax跟随鼠标单击移动的div

今天给大家分享一款基于TweenMax跟随鼠标单击移动的div.在这款实例中你可以单击任意位置,div会移动到你单击的位置.效果图如下: 在线预览   源码下载 实现的代码. html代码: <html ng-app="app" ng-click="moveblock($event)"> <body> <block class="block">Where Do You Want Me?<br />C