zoukankan      html  css  js  c++  java
  • php 操作提示框

    /**
         * 跳转
         * @param type $msg
         * @param type $url
         */
        protected function jump($msg, $url)
        {
            $html = <<<EOF
    <!DOCTYPE html>
    <html lang="en">
    	<head><title>提示</title></head>
    	<style>
    body {
      font-size: 100%;
      font-family: "Lato", sans-serif;
      color: #8f9cb5;
      background-color: #ffd88f;
    }
    .cd-popup {
      position: fixed;
      left: 0;
      top: 0;
      height: 100%;
       100%;
      background-color: rgba(94, 110, 141, 0.9);
      opacity: 0;
      visibility: hidden;
      -webkit-transition: opacity 0.3s 0s, visibility 0s 0.3s;
      -moz-transition: opacity 0.3s 0s, visibility 0s 0.3s;
      transition: opacity 0.3s 0s, visibility 0s 0.3s;
    }
    .cd-popup.is-visible {
      opacity: 1;
      visibility: visible;
      -webkit-transition: opacity 0.3s 0s, visibility 0s 0s;
      -moz-transition: opacity 0.3s 0s, visibility 0s 0s;
      transition: opacity 0.3s 0s, visibility 0s 0s;
    }
    
    .cd-popup-container {
      position: relative;
       90%;
      max- 400px;
      margin: 4em auto;
      background: #FFF;
      border-radius: .25em .25em .4em .4em;
      text-align: center;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
      -webkit-transform: translateY(-40px);
      -moz-transform: translateY(-40px);
      -ms-transform: translateY(-40px);
      -o-transform: translateY(-40px);
      transform: translateY(-40px);
      /* Force Hardware Acceleration in WebKit */
      -webkit-backface-visibility: hidden;
      -webkit-transition-property: -webkit-transform;
      -moz-transition-property: -moz-transform;
      transition-property: transform;
      -webkit-transition-duration: 0.3s;
      -moz-transition-duration: 0.3s;
      transition-duration: 0.3s;
    }
    .cd-popup-container p {
      padding: 1em 1em;
    }
    	</style>
    	<body>
    		<div class="cd-popup is-visible" role="alert">
    			<div class="cd-popup-container">
    				<p>{$msg}</p>
    				<span id="time" style="background: red;">3</span>
    				秒后自动跳转,如不跳转,请点击:<a href="{$url}">{$msg}</a>
    			</div> <!-- cd-popup-container -->
    		</div> <!-- cd-popup -->
    		
    		<script  type="text/javascript">
    		
    				delayURL("{$url}");
    				
    				function delayURL(url) {
    					var delay = document.getElementById("time").innerHTML;
    					if (delay > 0) {
    						delay--;
    						document.getElementById("time").innerHTML = delay
    					} else {
    						window.top.location.href = url
    					}
    					setTimeout("delayURL('" + url + "')", 1000)
    				}
    
    		</script>
    	</body>
    </html>
    EOF;
            echo $html;die;
        }
    

      

  • 相关阅读:
    delete误删除恢复
    oracle自增字段
    oracle唯一约束
    linux得到系统当前日期
    to_char+fm
    oracle范围分区
    oracle之use_hash用法
    oracle11g的regexp函数
    第一个脚本输入参数
    使用ctl将txt或csv文件导入表数据
  • 原文地址:https://www.cnblogs.com/xyyphp/p/6025871.html
Copyright © 2011-2022 走看看