phpcmsV9自定义提示页面的样式

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35393869/article/details/81908210

phpcmsV9自定义提示页面的样式

对应修改的文件为:phpcms/templates/default/content/message.html

首先,我们看一下自定义前后的效果图,如下:

前后对比

自定义UI样式 - 全部代码,参考如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>提示信息</title>

<style type="text/css">
*{ padding:0; margin:0; font-size:12px}ul,li{list-style: none;}
.showMsg .guery {white-space: pre-wrap; /* css-3 */white-space: -moz-pre-wrap; /* Mozilla, since 1999 */white-space: -pre-wrap; /* Opera 4-6 */white-space: -o-pre-wrap; /* Opera 7 */  word-wrap: break-word; /* Internet Explorer 5.5+ */}
a:link,a:visited{text-decoration:none;color:#0068a6}
a:hover,a:active{color:#ff6600;text-decoration: underline}
.showMsg{border: 1px solid #1054ff; zoom:1; width:450px; height:auto;position:absolute;top:30%;left:50%;margin:-87px 0 0 -225px}
.showMsg h5{background: #1054ff; color:#fff; height:45px; line-height:45px;*line-height:45px; overflow:hidden; font-size:18px; text-align:center;}
.showMsg .content{ padding:46px 12px 10px 45px; font-size:16px;font-weight: 600;height:66px;}
.showMsg .bottom{ background:/*#e4ecf7*/none; margin: 0 1px 30px 1px;line-height:45px; *line-height:45px; height:45px; text-align:center}
.showMsg .ok,.showMsg .guery{background: url(<?php echo IMG_PATH?>/msg_img/msg_bg.png) no-repeat 0px -560px;}
.showMsg .guery{background-position: left -460px;}
/**/
.btndialog{display: inline-block;width: 100%;}
.btndialog li.fl{float: left;padding-left: 50px;}
.btndialog li.fr{float: right;padding-right: 50px;}
.btndialog a{text-decoration: none;border:#1054ff solid 1px;color: #1054ff;display: inline-block;width: 110px;text-align: center;line-height: 45px;font-size: 16px;}
.btndialog .link{-moz-border-radius: 5px;-webkit-border-radius: 5px;border-radius: 5px;}
.btndialog a.goindex{background: #1054ff;color: #FFF;}
.btndialog a:hover{background: #4074e1;color: #FFF;border-color:#4074e1;}
</style>
<script type="text/javaScript" src="{JS_PATH}jquery.min.js"></script>
<script language="JavaScript" src="{JS_PATH}admin_common.js"></script>
</head>
<body>
<div class="showMsg" style="text-align:center">
    <h5>提示信息</h5>
    <div class="content guery" style="display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline; max-width:280px">{$msg}</div>
    <div class="bottom">
        {if $url_forward=='goback' || $url_forward==''}
            <ul class="btndialog">
                <li class="fl"><a class="link" href="javascript:history.back();">返回上一页</a></li>
                <li class="fr"><a class="link goindex" href="http://localhost/">返回首页</a></li>
            </ul>
        {elseif $url_forward=="close"}
            <ul class="btndialog">
                <li class="fl"><a class="link" onClick="window.close();">关闭</a></li>
                <li class="fr"><a class="link goindex" href="http://localhost/">返回首页</a></li>
            </ul>
        {elseif $url_forward=="blank"}
        {elseif $url_forward}
            <ul class="btndialog">
                <li class="fl"><a class="link" href="{strip_tags($url_forward)}">返回上一页</a></li>
                <li class="fr"><a class="link goindex" href="http://localhost/">返回首页</a></li>
            </ul>

            <script language="javascript">
                setTimeout("redirect('{strip_tags($url_forward)}');",{$ms});
            </script>
        {/if}
        {if $dialog}
            <script style="text/javascript">
                window.top.location.reload();
                window.top.art.dialog({id:"{$dialog}"}).close();
            </script>
        {/if}
    </div>
</div>
<script style="text/javascript">
    function close_dialog() {
        window.top.location.reload();
        window.top.art.dialog({id:"<?php echo $dialog?>"}).close();
    }
</script>
</body>
</html>

通过上述代码的调整,可以实现UI效果重构。


另外还有一种方法,直接修改指定的引用文件为message_other.html,即是重新命名文件,作为提示页面。

但是,原来文件message.html中的后台逻辑代码,还是需要有所保留和注意逻辑顺序的!
具体操作文件:phpcms\libs\functions\global.func.php
.
参考链接 —— [ 百度问答 ]


以上就是关于“ phpcmsV9自定义提示页面的样式 ” 的全部内容。

猜你喜欢

转载自blog.csdn.net/qq_35393869/article/details/81908210