jquery右下角自动弹出可关闭的广告层

右下角弹出层后,会在一定时间后自动隐藏。

html代码:

<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <title>jquery右下角自动弹出关闭层</title><base target="_blank"/>
  <script type="text/javascript" src="jquery/jquery-1.11.2.min.js"></script>
  <style type="text/css">
    * {
      margin: 0px;
      padding: 0px;
    }
    a {color:black;
    }
    #keleyislide {
      width: 300px;
      height: 200px;
      border: 1px solid #000;
      position: fixed;
      bottom: 2px;
      right: 2px;
      display: none;
      background-color: White;
      z-index:9999;
    }

      #keleyislide a {
        position: absolute;
        top: 8px;
        right: 8px;
        font-size: 12px;
        text-decoration: none;
        color: Blue;
      }

      #keleyislide h2 {
        font-size: 24px;
        text-align: center;
        font-family: "微软雅黑";
      }

    #reshow {
      position: fixed;
      right: 2px;
      bottom: 2px;
      font-size: 12px;
      display: none;
      background-color: White;
      cursor: pointer;
      border: 1px solid #000;
    }
  </style>
</head>

<body>
  <div style="background-color:Green; width:100%;height:150px;">keleyi.com</div>
  <div style="background-color:Red; width:100%;height:150px;">欢迎</div>
  <div style="background-color:Yellow; width:100%;height:150px;"> 一定时间后弹出层会自动隐藏
  </div>
  <div style="background-color:Silver; width:100%;height:150px;">计划</div>
  <div style="background-color:Aqua; width:100%;height:150px;">aaaa</div>
  <div style="background-color:Fuchsia; width:100%;height:150px;">jihua</div>
  <div style="background-color:Green; width:100%;height:150px;">jb51.net</div>
  <div style="background-color:Blue; width:100%;height:150px;">bbbb</div>
  <div style="background-color:Olive; width:100%;height:150px;">欢迎光临</div>
  <div style="background-color:Green; width:100%;height:150px;">randomvisit</div>
  <div style="background-color:Purple; width:100%;height:150px;">cccc</div>
  <div style="background-color:Green; width:100%;height:150px;">B</div>
  <div style="background-color:Lime; width:100%;height:150px;">myslider</div>
  <div style="background-color:Orange; width:100%;height:150px;">Jihua</div>
  <div id="reshow">你快回来</div>
  <div id="keleyislide">
    <a href="javaScript:void(0)" id="close" target="_self">关闭</a>
    <span style=" line-height:50px;">右下角滑动弹出可重现层<br /></span>
  </div>
  <script type="text/javascript">
    function Jihua_Cnblogs_Com() { $("#kel"+"eyislide").slideDown("slow"); $("#reshow").hide(); }
    function KeleyiAutoHide() { $("#ke"+"leyislide").slideUp("slow"); $("#reshow").show(); }
    $(document).ready(function () {
      setTimeout(function () {
        Jihua_Cnblogs_Com();
      }, 1000)
      setTimeout(function () { KeleyiAutoHide(); },9000)
      $("#close").click(function () {
        KeleyiAutoHide();
      })
      $("#reshow").mouseover(function () {
        Jihua_Cnblogs_Com();       })
    })
  </script>
</body>
</html>

以上所述就是本文的全部内容了,希望大家能够喜欢。

(0)

相关推荐

  • emapicn.exe,winpac.exe恶意插件疯弹广告解决方法

    1.运行强制删除工具PowerRMV 下载地址:down.45it.com 分别复制下面的文件(包括完整的路径) ,勾选"清除,并抑止文件再次生成",点开始[有找不到提示的请忽略错误继续] d:\program files\common files\sevcha\emapicn.exe d:\program files\common files\sevcha\winpac.exe 2.删除重启后使用SREng(可到down.45it.com下载): 删除下面的服务(运行SRENG---

  • js退弹 IE关闭时弹出广告代码,可以防止屏蔽

    在网上寻觅了很久JS退弹代码,也没有找出让人非常满意的代码.于是今天把收集的退弹代码做了一下整理,精简出一个非常短小精悍而强力的JS退弹代码,能够突破现在绝大多数浏览器的限制,包括SP2.IE6.IE7.遨游.MYIE等等. 现提供给有这方面需求的用户: 完整版24小时只弹一次的代码 复制代码 代码如下: function Get(){ var Then = new Date() Then.setTime(Then.getTime() + 24*60*60*1000) //这里是24小时,如果想

  • 弹出广告特效代码(一个IP只弹出一次)

    <script> var cookieString = new String(document.cookie) var cookieHeader = 'happy_pop=' //更换happy_pop为任意名称 var beginPosition = cookieString.indexOf(cookieHeader) if (beginPosition <0){ window.open('2.html','','top=0,left=0,width=787,height=480,to

  • js左右弹性滚动对联广告代码分享

    复制代码 代码如下: <p><meta content="text/html; charset=gb2312" http-equiv="Content-Type" /><style type="text/css"> .shuoming {margin-top:20px; border:1px solid #ccc; padding-bottom:10px; width:600px; margin:0 auto;

  • 弹出广告特效(一个IP只弹出一次)的代码

    <script> var cookieString = new String(document.cookie) var cookieHeader = 'happy_pop=' //更换happy_pop为任意名称 var beginPosition = cookieString.indexOf(cookieHeader) if (beginPosition <0){ window.open('2.html','','top=0,left=0,width=787,height=480,to

  • JavaScript定时器制作弹窗小广告

    本文实例为大家分享了js定时器制作弹窗广告的具体代码,供大家参考,具体内容如下 <head> <meta charset="UTF-8"> <title>Title</title> <style type="text/css"> * { padding: 0; margin: 0; } li { list-style: none; } body { background: #940032; } #count

  • JavaScript常用的弹出广告及背投广告实现方法

    本文实例讲述了JavaScript常用的弹出广告及背投广告实现方法.分享给大家供大家参考.具体分析如下: 弹出广告和背景广告在大网站用的比较多,也是站长的必备代码,本代码段中包括弹出窗口广告以及背投广告两种形式,根据自己的需要,你可以随意选择. 注:这类广告不建议大家用,大多浏览器都会把此类AD拦截,只为大家学习之用. 复制代码 代码如下: <html> <head> <title>JavaScript常用的弹出广告及背投广告代码</title> </

  • 仿中关村在线首页弹出式广告插件(jQuery版)

    其的就不多说啦,直接上代码: jquery 插件: 复制代码 代码如下: /* 疯狂秀才 制作 于 2012-04-24 17:00 QQ: 1055818239 email: hxl_apple@163.com */ (function($){ $.fn.quickAd = function(settings){ settings = $.extend({ width:760, height:400, html:'我是广告内容', top:130, sec:5, //广告显示时长,单位秒 bo

  • JS实现弹性漂浮效果的广告代码

    本文实例讲述了JS实现弹性漂浮效果的广告代码.分享给大家供大家参考.具体如下: 这里介绍一款JS弹性漂浮广告代码,碰到网页浏览器的边缘就会顺着弹力的方向自动漂浮下去,不停的在网页上漂来漂去,漂浮广告代码是很早时候就有的代码了,使用广泛,而且做为广告来说,好像效果还不错,因为它在不停的动,让人在视觉上感觉到有一种吸引力.其中的JS代码你可以扣出来保存在一个单独的JS文件中,使用时调用即可. 运行效果截图如下: 在线演示地址如下: http://demo.jb51.net/js/2015/js-mo

  • 基于jQuery的网页右下角弹出广告(IE7,firefox)

    演示代码: 测试 .divCss{ bottom:0; display:block; height:25px; overflow:hidden; padding:0; position:fixed; right:20px; } .contentCss{ background:#666; height:200px; width:200px; } .contentCssHeight{ } .titleCss{ width:200px; height:25px; line-height:25px; t

随机推荐