全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1795|回复: 7

[Windows VPS] 求一个简单的广告代码~

[复制链接]
发表于 2015-2-13 09:49:12 | 显示全部楼层 |阅读模式
300金钱
本帖最后由 junhan 于 2015-2-13 10:01 编辑

放在网页顶部 ,主要写一个放假通知

960*50,可关闭,24小时内刷新不显示,兼容性好

相信很多人需要吧?网上找了一些不好用。谢谢

最佳答案

查看完整内容

Close .notice { font-size: 14px; font-family: "Microsoft yahei"; height: 60px; width: 980px; padding:10px; margin: 10px auto; background-color: #00d254; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; color: white; } .close { float: right; height: 15px; width: 15px; margin-top: -10px; margin-right: -10px; ...
发表于 2015-2-13 09:49:13 | 显示全部楼层
<!doctype html>
<html lang="en">
<head>
        <meta charset="UTF-8">
        <title>Close</title>
        <script src="http://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js"></script>
        <script src="./jquery.cookie.js"></script>
        <style>
                .notice {
                        font-size: 14px;
                        font-family: "Microsoft yahei";
                        height: 60px;
                        width: 980px;
                        padding:10px;
                        margin: 10px auto;
                        background-color: #00d254;
                        -webkit-border-radius: 5px;
                        -moz-border-radius: 5px;
                        border-radius: 5px;
                        color: white;
                }
                .close {
                        float: right;
                        height: 15px;
                        width: 15px;
                        margin-top: -10px;
                        margin-right: -10px;
                        color: white;
                        cursor: pointer;
                        z-index: -1;
                }
        </style>
        <script>
        $(document).ready(function() {
                var cookie = $.cookie('notice');
                if (cookie != null) {
                        $(".notice").remove();
                } else {
                        $(".close").click(function() {
                                $(".notice").hide('400');
                                $.cookie('notice','notice',{expires:1});
                        });
                }
        });
        </script>
</head>
<body>
        <div class="notice">
                <div class="close">x</div>
                同志们放假了!!!
        </div>
</body>
</html>


不謝,自己下一個Jquery.cookie.js引入,不能上傳附件。

点评

关闭后刷新又有了啊  发表于 2015-2-13 12:46
发表于 2015-2-13 09:58:05 | 显示全部楼层
好高端大气上档次的样子
发表于 2015-2-13 09:59:38 | 显示全部楼层
用jquery加几个plugin就好了。。
发表于 2015-2-13 10:24:14 | 显示全部楼层
<a href="网站"><img src="图片"></a>

300给我吧
发表于 2015-2-13 11:05:40 | 显示全部楼层
<a href="网站"><img src="图片"></a>
发表于 2015-2-13 13:10:35 | 显示全部楼层
lolidc 发表于 2015-2-13 10:51
Close
       
       

沒有啊! 你引入Jquery.cookie.js沒
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-3-28 17:48 , Processed in 0.286633 second(s), 15 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表