Thinkphp自定义美化success和error提示跳转页面

/success short animate/

@-webkit-keyframes success_short_Animation {

0% {

width: 0;

left: 1px;

top: 19px;

}

54% {

width: 0;

left: 1px;

top: 19px;

}

70% {

width: 50px;

left: -4px;

top: 37px;

}

84% {

width: 17px;

left: 21px;

top: 48px;

}

100% {

width: 25px;

left: 14px;

top: 45px;

}

}

@-moz-keyframes success_short_Animation {

0% {

width: 0;

left: 1px;

top: 19px;

}

54% {

width: 0;

left: 1px;

top: 19px;

}

70% {

width: 50px;

left: -4px;

top: 37px;

}

84% {

width: 17px;

left: 21px;

top: 48px;

}

100% {

width: 25px;

left: 14px;

top: 45px;

}

}

@-webkit-keyframes success_short_Animation {

0% {

width: 0;

left: 1px;

top: 19px;

}

54% {

width: 0;

left: 1px;

top: 19px;

}

70% {

width: 50px;

left: -4px;

top: 37px;

}

84% {

width: 17px;

left: 21px;

top: 48px;

}

100% {

width: 25px;

left: 14px;

top: 45px;

}

}

/success short animate/

/success long animate/

@-webkit-keyframes success_long_Animation {

0% {

width: 0;

right: 46px;

top: 54px;

}

65% {

width: 0;

right: 46px;

top: 54px;

}

84% {

width: 55px;

right: 0px;

top: 35px;

}

100% {

width: 47px;

right: 8px;

top: 38px;

}

}

@-moz-keyframes success_long_Animation {

0% {

width: 0;

right: 46px;

top: 54px;

}

65% {

width: 0;

right: 46px;

top: 54px;

}

84% {

width: 55px;

right: 0px;

top: 35px;

}

100% {

width: 47px;

right: 8px;

top: 38px;

}

}

@-webkit-keyframes success_long_Animation {

0% {

width: 0;

right: 46px;

top: 54px;

}

65% {

width: 0;

right: 46px;

top: 54px;

}

84% {

width: 55px;

right: 0px;

top: 35px;

}

100% {

width: 47px;

right: 8px;

top: 38px;

}

}

/success long animate/

/load_Animation/

@-webkit-keyframes load_Animation {

0% {

-webkit-transform: scale(0.6);

opacity: 0.2;

}

50% {

-webkit-transform: scale(0.6);

opacity: 0.5;

}

80% {

-webkit-transform: scale(1.15);

opacity: 0.8;

}

100% {

-webkit-transform: scale(1);

opacity: 1.0;

}

}

@-moz-keyframes load_Animation {

0% {

-webkit-transform: scale(0.6);

opacity: 0.2;

}

50% {

-webkit-transform: scale(0.6);

opacity: 0.5;

}

80% {

-webkit-transform: scale(1.15);

opacity: 0.8;

}

100% {

-webkit-transform: scale(1);

opacity: 1.0;

}

}

@-webkit-keyframes load_Animation {

0% {

-webkit-transform: scale(0.6);

opacity: 0.2;

}

50% {

-webkit-transform: scale(0.6);

opacity: 0.5;

}

80% {

-webkit-transform: scale(1.15);

opacity: 0.8;

}

100% {

-webkit-transform: scale(1);

opacity: 1.0;

}

}

/load_Animation/

/lose_Animation/

@-webkit-keyframes lose_Animation {

0% {

-webkit-transform: scale(0.6);

opacity: 0.2;

}

50% {

-webkit-transform: scale(0.6);

opacity: 0.5;

}

80% {

-webkit-transform: scale(1.15);

opacity: 0.8;

}

100% {

-webkit-transform: scale(1);

opacity: 1.0;

}

}

@-moz-keyframes lose_Animation {

0% {

-webkit-transform: scale(0.6);

opacity: 0.2;

}

50% {

-webkit-transform: scale(0.6);

opacity: 0.5;

}

80% {

-webkit-transform: scale(1.15);

opacity: 0.8;

}

100% {

-webkit-transform: scale(1);

opacity: 1.0;

}

}

@-webkit-keyframes lose_Animation {

0% {

-webkit-transform: scale(0.6);

opacity: 0.2;

}

50% {

-webkit-transform: scale(0.6);

opacity: 0.5;

}

80% {

-webkit-transform: scale(1.15);

opacity: 0.8;

}

100% {

-webkit-transform: scale(1);

opacity: 1.0;

}

}

/lose_Animation/

.load {

position: relative;

width: 60px;

height: 80px;

border-radius: 50px;

-webkit-border-radius: 50px;

-moz-border-radius: 50px;

border: 4px solid #fff;

margin: 15px auto 5px auto;

top: 10px;

}

.load .icon_box {

margin: 10px auto;

width: 60px;

height: 60px;

}

.load .cirBox1,

.load .cirBox2,

.load .cirBox3 {

width: 60px;

height: 60px;

position: absolute;

left: 0;

top: 0;

}

.load .cirBox1 > div,

.load .cirBox2 > div,

.load .cirBox3 > div {

width: 10px;

height: 10px;

border-radius: 100%;

-webkit-border-radius: 100%;

-moz-border-radius: 100%;

background-color: #ccc;

position: absolute;

}

.load .cirBox1 {

transform: rotate(30deg);

-webkit-transform: rotate(30deg);

-moz-transform: rotate(30deg);

}

.load .cirBox2 {

transform: rotate(60deg);

-webkit-transform: rotate(60deg);

-moz-transform: rotate(60deg);

}

.load .cirBox3 {

transform: rotate(90deg);

-webkit-transform: rotate(90deg);

-moz-transform: rotate(90deg);

}

.load .cir1 {

left: 0;

top: 0;

}

.load .cir2 {

right: 0;

top: 0;

}

.load .cir3 {

right: 0;

bottom: 0;

}

.load .cir4 {

left: 0;

bottom: 0;

}

.load .cir1,

.load .cir2,

.load .cir3,

.load .cir4 {

-webkit-animation: cir_Animation 1.2s ease 0s infinite;

-moz-animation: cir_Animation 1.2s ease 0s infinite;

animation: cir_Animation 1.2s ease 0s infinite;

}

.cirBox1 .cir2 {

-webkit-animation-delay: -1.1s;

-moz-animation-delay: -1.1s;

animation-delay: -1.1s;

}

.cirBox1 .cir3 {

-webkit-animation-delay: -0.8s;

-moz-animation-delay: -0.8s;

animation-delay: -0.8s;

}

.cirBox1 .cir4 {

-webkit-animation-delay: -0.5s;

-moz-animation-delay: -0.5s;

animation-delay: -0.5s;

}

.cirBox2 .cir2 {

-webkit-animation-delay: -1s;

-moz-animation-delay: -1s;

animation-delay: -1s;

}

.cirBox2 .cir3 {

-webkit-animation-delay: -0.7s;

-moz-animation-delay: -0.7s;

animation-delay: -0.7s;

}

.cirBox2 .cir4 {

-webkit-animation-delay: -0.4s;

-moz-animation-delay: -0.4s;

animation-delay: -0.4s;

}

.cirBox3 .cir2 {

-webkit-animation-delay: -0.9s;

-moz-animation-delay: -0.9s;

animation-delay: -0.9s;

}

.cirBox3 .cir3 {

-webkit-animation-delay: -0.6s;

-moz-animation-delay: -0.6s;

animation-delay: -0.6s;

}

.cirBox3 .cir4 {

-webkit-animation-delay: -0.3s;

-moz-animation-delay: -0.3s;

animation-delay: -0.3s;

}

@-webkit-keyframes cir_Animation {

0%,

80%,

100% {

-webkit-transform: scale(0.4);

}

40% {

-webkit-transform: scale(1);

}

}

@-moz-keyframes cir_Animation {

0%,

80%,

100% {

-webkit-transform: scale(0.4);

}

40% {

-webkit-transform: scale(1);

}

}

@-webkit-keyframes cir_Animation {

0%,

80%,

100% {

-webkit-transform: scale(0.4);

}

40% {

-webkit-transform: scale(1);

}

}

.mask {

width: 100%;

height: 100%;

background-color: #000;

opacity: .8;

position: fixed;

left: 0;

top: 0;

z-index: 1000;

}

2、修改application/config.php里,默认跳转页面对应的模板文件

// 视图输出字符串内容替换

‘view_replace_str’ => [‘STATIC’=>‘/static’],

// 默认跳转页面对应的模板文件

//‘dispatch_success_tmpl’ => THINK_PATH . ‘tpl’ . DS . ‘dispatch_jump.tpl’,

//‘dispatch_error_tmpl’ => THINK_PATH . ‘tpl’ . DS . ‘dispatch_jump.tpl’,

‘dispatch_success_tmpl’ => THINK_PATH . ‘tpl’ . DS .‘default_jump.tpl’,

‘dispatch_error_tmpl’ => THINK_PATH . ‘tpl’ . DS .‘default_jump.tpl’,

3、在thinkphp/tpl目录下新建一个default_jump.tpl,代码如下:

{NOLAYOUT}

跳转提示
<?php switch ($code) {?> <?php case 1:?>
<?php echo(strip_tags($msg));?>
<?php break;?> <?php case 0:?>
<?php echo(strip_tags($msg));?>
<?php break;?> <?php } ?>

页面自动跳转 等待时间: <?php echo($wait);?>

点击跳转

  • 16
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值