zoukankan      html  css  js  c++  java
  • div遮盖层

    <html>
    <head>
    <title></title>
    <script type="text/javascript">
    function show() {
    document.getElementById(
    "mask").style.display = "";
    document.getElementById(
    "content1").style.display = "";
    document.getElementById(
    "mask").style.filter = "Alpha(Opacity=10)";//透明度
    document.getElementById("content1").innerHTML = "你的内容<input onclick='hide()' type='button' value='确定'/>";
    }
    function hide() {
    document.getElementById(
    "mask").style.display = "none";
    document.getElementById(
    "content1").style.display = "none";
    }
    </script>
    </head>
    <body>
    <div style=" 100%; background-color:Gray; display:none; height: 100%; position:absolute;left:0px;top:0px;" id="mask"></div>
    <div style=" 260px; background-color:Blue; display:none; height: 113px; position:absolute; left: 244px; top: 137px;" id="content1"></div>
    <div id="fuck">
    <input onclick="show()" type="button" value="显示"/>
    </div>
    <script type="text/javascript">
    function ScrollDiv() {
    document.getElementById(
    "mask").style.top = document.body.scrollTop+ "px";
    document.getElementById(
    "mask").style.left = (document.body.scrollLeft) + "px";
    }
    window.onscroll
    = ScrollDiv;
    window.onresize
    = ScrollDiv;
    //window.onload = ScrollDiv;如果是ajax中用这个会出现问题。
    </script>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    </body>
    </html>

  • 相关阅读:
    SGU 176.Flow construction (有上下界的最大流)
    POJ 2391.Ombrophobic Bovines (最大流)
    poj 1087.A Plug for UNIX (最大流)
    poj 1273.PIG (最大流)
    POJ 2112.Optimal Milking (最大流)
    SGU 196.Matrix Multiplication
    SGU 195. New Year Bonus Grant
    关于multicycle path
    ppt做gif动图
    codeforces 598A Tricky Sum
  • 原文地址:https://www.cnblogs.com/xingbinggong/p/2182755.html
Copyright © 2011-2022 走看看