index index.html index.htm index.php

server {
        listen       80;
        server_name  localhost;
        index index.html index.htm index.php;#前后顺序有关系,越在前优先级别越高
        root /app/www/default;
        location ~ .*\.(php|php5)?$
        {
                #fastcgi_pass  unix:/tmp/php-cgi.sock;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
                expires 30d;
        }
        location ~ .*\.(js|css)?$
        {
                expires 1h;
        }
        include /app/server/nginx/conf/rewrite/default.conf;
        access_log  /app/log/nginx/access/default.log;
#如果的网站的根目录下 有index.html 和index.php的话会显示index.html,不会显示index.php
#如果是  index index.php index.htm index.html;的话并且根目录下同时有index.html和index.php,会显示index.php

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>跳动的小球</title> <style type="text/css"> *{margin:0;padding:0;font-family:"Microsoft Yahei";} body{ overflow: hidden; } #box{ position: absolute; z-index: 1; top: 0; left: 0; width: 50px; height: 50px; background: radial-gradient(#ff0,#f00); border-radius: 50%; } .shadow{ position: absolute; width: 50px; height: 50px; background: pink; border-radius: 50%; transform: scale(1); opacity: 1; animation: hide .5s 1; animation-fill-mode: forwards; } @keyframes hide { from{transform: scale(1);opacity: 1} to{transform: scale(0);opacity: 0} } </style> </head> <body> <div id="box"></div> <script type="text/javascript"> (function(){ //获取节点 let oBox = document.getElementById("box"); //提前计算好最大值限制 let maxH = document.documentElement.clientHeight - 50, maxW = document.documentElement.clientWidth - 50; //监听resize,改变maxH,maxW window.onresize = function(){ maxH = document.documentElement.clientHeight - 50; maxW = document.documentElement.clientWidth - 50; }; //提前定义好,水平方向的速度 和 垂直方向的速度 let Vx = 20,Vy = 8; (function m(){ //先计算球即将要到达的位置 let left = oBox.offsetLeft + Vx, top = oBox.offsetTop + Vy; //做边界判断 if ( left >= maxW ){ left = maxW; Vx = -Vx; } if (top >= maxH){ top = maxH; Vy = -Vy; } if (left <= 0){ left = 0; Vx = -Vx; } if(top <= 0){ top = 0; Vy = -Vy; } //改变样式 oBox.style.left = left + 'px'; oBox.style.top = top + 'px'; //每次帧动画时创建一个相同大小的球 createShadow(left,top); requestAnimationFrame(m); })(); //阴影盒子的生产 function createShadow(left,top){ let div = document.createElement("div"); div.classList.add("shadow"); div.style.cssText = `left:${left}px;top:${top}px;`; document.body.appendChild(div); setTimeout(()=>{ document.body.removeChild(div); div = null; },1000) } })(); </script> </body> </html>

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值