下载鸥 > 网站下载 > 开发教程 > PHP

PHP页面过度跳转效果代码

1010 2021-02-04 14:11:05

收藏

PHP+CSS3小脑袋无限吃球球动态效果,页面过度跳转,具体效果如下图

 

PHP页面过度跳转效果代码
<?php 
$t_url=$_GET['url'];
if(!empty($t_url)) {
 preg_match('/(http|https):///',$t_url,$matches);
 if($matches){
 $url=htmlspecialchars($t_url);
 $title='亲爱的朋友记得常回来哦...';
 } else {
 preg_match('/./i',$t_url,$matche);
 if($matche){
 $url='http://'.htmlspecialchars($t_url);
 $title='亲爱的朋友记得常回来哦...';
 } else {
 $url='http://www.11px.cn/';
 $title='参数错误,正在返回首页...';
 }
 }
} else {
 $title='参数缺失,正在返回首页...';
 $url='http://www.11px.cn/';
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="1;url='<?php echo $url;?>';">
<title><?php echo $title;?></title>
<div id="circle"></div>
<div id="circletext"></div>
<div id="circle1"></div>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="1;url='<?php echo $url;?>';">
<title><?php echo $title;?></title>
<style type="text/css">
        body{background:#999;margin:0;}.loader{-webkit-animation:fadein 2s;-moz-animation:fadein 2s;-o-animation:fadein 2s;animation:fadein 2s;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;}@-moz-keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-o-keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadein{from{opacity:0}to{opacity:1}}.loader-inner{position:absolute;z-index:300;top:40%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%);}@-webkit-keyframes rotate_pacman_half_up{0%{-webkit-transform:rotate(270deg);transform:rotate(270deg);}50%{-webkit-transform:rotate(360deg);transform:rotate(360deg);}100%{-webkit-transform:rotate(270deg);transform:rotate(270deg);}}@keyframes rotate_pacman_half_up{0%{-webkit-transform:rotate(270deg);transform:rotate(270deg);}50%{-webkit-transform:rotate(360deg);transform:rotate(360deg);}100%{-webkit-transform:rotate(270deg);transform:rotate(270deg);}}@-webkit-keyframes rotate_pacman_half_down{0%{-webkit-transform:rotate(90deg);transform:rotate(90deg);}50%{-webkit-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(90deg);transform:rotate(90deg);}}@keyframes rotate_pacman_half_down{0%{-webkit-transform:rotate(90deg);transform:rotate(90deg);}50%{-webkit-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(90deg);transform:rotate(90deg);}}@-webkit-keyframes pacman-balls{75%{opacity:0.7;}100%{-webkit-transform:translate(-100px,-6.25px);transform:translate(-100px,-6.25px);}}@keyframes pacman-balls{75%{opacity:0.7;}100%{-webkit-transform:translate(-100px,-6.25px);transform:translate(-100px,-6.25px);}}.pacman > div:nth-child(2){-webkit-animation:pacman-balls 1s 0s infinite linear;animation:pacman-balls 1s 0s infinite linear;}.pacman > div:nth-child(3){-webkit-animation:pacman-balls 1s 0.33s infinite linear;animation:pacman-balls 1s 0.33s infinite linear;}.pacman > div:nth-child(4){-webkit-animation:pacman-balls 1s 0.66s infinite linear;animation:pacman-balls 1s 0.66s infinite linear;}.pacman > div:nth-child(5){-webkit-animation:pacman-balls 1s 0.99s infinite linear;animation:pacman-balls 1s 0.99s infinite linear;}.pacman > div:first-of-type{width:0px;height:0px;border-right:25px solid transparent;border-top:25px solid #e1244e;border-left:25px solid #e1244e;border-bottom:25px solid #e1244e;border-radius:25px;-webkit-animation:rotate_pacman_half_up 0.5s 0s infinite;animation:rotate_pacman_half_up 0.5s 0s infinite;}.pacman > div:nth-child(2){width:0px;height:0px;border-right:25px solid transparent;border-top:25px solid #e1244e;border-left:25px solid #e1244e;border-bottom:25px solid #e1244e;border-radius:25px;-webkit-animation:rotate_pacman_half_down 0.5s 0s infinite;animation:rotate_pacman_half_down 0.5s 0s infinite;margin-top:-50px;}.pacman > div:nth-child(3),.pacman > div:nth-child(4),.pacman > div:nth-child(5),.pacman > div:nth-child(6){background-color:#e1244e;width:15px;height:15px;border-radius:100%;margin:2px;width:10px;height:10px;position:absolute;-webkit-transform:translate(0,-6.25px);-ms-transform:translate(0,-6.25px);transform:translate(0,-6.25px);top:25px;left:100px;}.loader-text{margin:20px 0 0 -16px;display:block;font-size: 18px;}
    </style>
</head>
<body>
    <div class="loader">
        <div class="loader-inner pacman">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <span class="loader-text">页面加载中,请稍候...</span>
        </div>
    </div>
</body>
</html>
代码使用方法

复制以上代码,保存到一个PHP文件中,浏览器访问:域名/ulr.php?需要跳转的地址,如:域名/url.php?http://www.11px.cn/

本文地址:https://xzo.com.cn/develop/php/509.html

有帮助,很赞!

信息来源:精准像素
导出教程 下载word版教程
发表评论 共有条评论
关于PHP

PHP是一种服务器端、跨平台、html嵌入式的脚本语言,其功能十分强大、入门简单。在过去,民间一直有说法称“PHP是最好的编程语言”,是PHP开发者对自身所使用语言的肯定。

PHP曾是最主流的网站web开发语言之一,现在也依然十分流行。

推荐PHP开发教程
str_replace怎样一次性替换多个值(数组)?
str_replace怎样一次性替换多个值(数组)?

我们知道,str_replace是可以执行替换命令的,但一般是用于一对一替换,这个很好...

1 411
ajax发起session请求发现session无效了怎么办?
ajax发起session请求发现session无效了怎么办?

今天遇到这样一个问题:php启用了session,经过测试也发现session生效了。但在a...

1 407
当缓存文件大于4KB,不能用cookie时的替代方案就是session
当缓存文件大于4KB,不能用cookie时的替代方案就是session

鸥哥最近在开发一个项目,出于对用户隐私的保护,数据一概不能存储到数据表,而是...

1 419
宝塔Nginx免费防火墙提示post参数(post_max_size)值长度超过20w已被系统拦截怎么办?
宝塔Nginx免费防火墙提示post参数(post_max_size)值长度超过20w已被系统拦截怎么办?

页面提交post请求后被宝塔防火墙拦截,查看日志显示错误:参数值长度超过20w已...

1 534
怎样在每次发起请求时重置session_id?
怎样在每次发起请求时重置session_id?

在一些开发场景中,我们需要在每次发起请求后更新重置session_id以同步用户数...

3 374
php怎样开启debug调试模式?
php怎样开启debug调试模式?

我们使用php开发网站的时候,经常会需要调试确保功能正常。而如果功能出现异...

0 611
PHP函数switch()介绍
PHP函数switch()介绍

通俗的说,现在有结果A B C D E,每个结果代表不同的意义,此时我们可以用if else...

0 388
PHP的for循环为什么只执行了一次就停止了?
PHP的for循环为什么只执行了一次就停止了?

今天有朋友咨询鸥哥,说php写的for循环本来至少要循环9次,但却只执行了一次就...

1 401
推荐插件
帝国cms网站会员登录与退出历史记录日志插件
帝国cms网站会员登录与退出历史记录日志插件

帝国cms默认只有上次登录时间与ip,没有一个记录清单,所以今天,我们分享这个帝...

0 374
帝国cms百度文字识别ocr接口对接插件
帝国cms百度文字识别ocr接口对接插件

许多网站会做一些小功能小插件给客户使用以增强用户黏性,比如图片转文字,这种...

0 435
帝国cms百度AI图像无损放大api接口对接插件
帝国cms百度AI图像无损放大api接口对接插件

通过本插件,可以实现帝国cms网站对接百度云api实现图像无损放大的功能。经过...

0 410
帝国cms百度AI图像去雾api接口对接插件
帝国cms百度AI图像去雾api接口对接插件

通过本插件,可以实现帝国cms网站对接百度云api实现图像去雾的功能。经过实际...

0 436
帝国CMS内网用户静态站点文章访客统计插件
帝国CMS内网用户静态站点文章访客统计插件

本插件适用于内网用户,可查看单篇文章访问者ip地址。如果添加访问者ip组,可查...

0 519
帝国cms智能自动审核按星期几审核指定栏目带推送插件
帝国cms智能自动审核按星期几审核指定栏目带推送插件

采集站的必备资源是自动审核,要做到日收录也离不开定时发布。而本插件的自动...

0 1228
帝国cms百度AI图像清晰度增强api接口对接插件
帝国cms百度AI图像清晰度增强api接口对接插件

通过本插件,可以实现帝国cms网站对接百度云api实现图像清晰度增强的功能。经...

0 496
帝国cms在线考试系统模板插件
帝国cms在线考试系统模板插件

一直没看到好用的帝国cms在线考试插件,所以自己开发了一款。在线考试插件用...

0 1248
客服QQ:341553759
扫码咨询 常见问题 >
官方交流群:90432500
点击加入