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

PHP页面过度跳转效果代码

1030 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开发教程
PHP怎样正则匹配段落里的图片并提取图片链接?
PHP怎样正则匹配段落里的图片并提取图片链接?

在程序开发的过程中,我们可能需要提取段落里的图片用作缩略图。那么,这个正则...

19 934
PHP正则提取字符串中的数字组成数组
PHP正则提取字符串中的数字组成数组

在实际操作过程中,我们可能需要通过PHP正则提取字符串中的数字,并组成数组。...

13 1419
PHP怎样高效快速地生成一组10条随机数?
PHP怎样高效快速地生成一组10条随机数?

猜你喜欢如果用rand()来获取随机ID是非常消耗性能的。小网站几百几千条数据...

1 459
PHP函数switch()介绍
PHP函数switch()介绍

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

0 438
php基础应用:获取今天是星期几并给变量赋值
php基础应用:获取今天是星期几并给变量赋值

在网站的开发过程中,我们经常需要获取今天是星期几,并根据星期的不同而进行不...

0 409
什么是高并发,与CPU,内存,分布式有什么关系
什么是高并发,与CPU,内存,分布式有什么关系

我们在网站开发的过程中经常会接触到高并发这个概念,但高并发到底是什么,具体...

1 395
简单的php高并发处理方案分享
简单的php高并发处理方案分享

很多互联网公司对并发要求比较高,如果完全依赖服务器性能的提升,则可能会面临...

0 405
怎样用php批量删除文件或者文件夹?
怎样用php批量删除文件或者文件夹?

在网站建成后的维护与优化阶段,我们会面临无用栏目/数据处理的问题。量小的...

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

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

0 471
帝国cms批量添加后台用户插件
帝国cms批量添加后台用户插件

使用帝国cms的企业用户、新闻资讯类站点的用户很多,此类站点很多时候需要有...

0 782
帝国cms自动给正文关键词添加tag内链
帝国cms自动给正文关键词添加tag内链

帝国cms有自带的给关键词添加内链功能,但需要手动添加关键词,容易出现疏漏和...

0 840
帝国cms纳米数据接口(足球比赛中最新数据)
帝国cms纳米数据接口(足球比赛中最新数据)

帝国cms 对接纳米数据(www.nami.com)接口,本接口主要接收、整理足球比赛实时数...

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

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

0 1285
帝国cms多栏目多数据表自动审核推送插件
帝国cms多栏目多数据表自动审核推送插件

本插件基于帝国cms帝国cms每日自动审核插件,在自动审核指定条数信息的基础上...

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

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

0 564
帝国cms网站会员登录与退出历史记录日志插件
帝国cms网站会员登录与退出历史记录日志插件

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

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