zoukankan      html  css  js  c++  java
  • 右下角浮动

    <!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>
    <TITLE>可关闭的右下角浮动广告</TITLE>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    </HEAD>
    <style>
    <!--
    .div{
     position: absolute;
     border: 2px solid red;
     background-color: #EFEFEF;
     line-height:90px;
     font-size:12px;
     z-index:1000;
     bottom:0;
     right:0;
    }
    #sky{
      240px;
      height:90px;
      text-align:left;  
    }
    #box{
     982px;
     height:900px;
    }
    -->
    </style>
    <BODY>
    <div id="box">
    可关闭的右下角浮动广告
    <div id="sky" class="div" >可关闭的右下角浮动广告<span title=关闭 style="CURSOR: hand;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick=closeDiv() >×</span><!--<IMG title=关闭 style="CURSOR: hand" onclick=closeDiv() hspace=3 src="msgClose.jpg">--></div>
    <SCRIPT LANGUAGE="JavaScript">
    function sc5(){
     document.getElementById("sky").style.top=(document.documentElement.scrollTop+document.documentElement.clientHeight-document.getElementById("sky").offsetHeight)+"px";
     document.getElementById("sky").style.left=(document.documentElement.scrollLeft+document.documentElement.clientWidth-document.getElementById("sky").offsetWidth)+"px";
    }
    function closeDiv()
    {
    document.getElementById('sky').style.visibility='hidden';
    if(objTimer) window.clearInterval(objTimer)
    }
    </SCRIPT>

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function scall(){
     sc5();
    }
    window.onscroll=scall;
    window.onresize=scall;
    window.onload=scall;
    //-->
    </SCRIPT>
    可关闭的右下角浮动广告  可关闭的右下角浮动广告
    </div>
    </BODY>
    </HTML>
  • 相关阅读:
    继承和多态
    访问限制
    返回函数
    类和实例
    requests
    函数的参数
    代码块的快速放置
    19进阶、基于TSP的直流电机控制设计
    18进阶、TLC语言
    17高级、Simulink代码生成技术详解
  • 原文地址:https://www.cnblogs.com/JamyWong/p/1819415.html
Copyright © 2011-2022 走看看