• 弹窗


    style

    <style type="text/css">
            * {
                margin: 0px;
                padding: 0px;
            }
    
            #tc_zhezhao {
                position: fixed;
                top: 0px;
                left: 0px;
                 100%;
                height: 100%;
                background-color: black;
                opacity: 0.3;
                filter: alpha(opacity=30);
                -moz-opacity: 0.3;
                display: none;
                z-index: 100000;
            }
    
            #tc_zt {
                position: fixed;
                top: -500px;
                left: 35%;
                 30%;
                height: 300px;
                background-color: white;
                z-index: 100001;
                border: 1px dotted black;
            }
    
            #tc_zt_bt {
                position: absolute;
                 100%;
                height: 50px;
                background-color: #c0c0c0;
            }
    
            #tc_zt_nr {
                position: absolute;
                left: 10%;
                top: 70px;
                 80%;
                height: 160px;
                text-align: center;
                word-wrap: break-word;
                background-color: aqua;
            }
    
            #tc_zt_an {
                position: absolute;
                left: 150px;
                top: 250px;
                 100px;
                height: 35px;
                background-color: black;
                border: 2px solid black;
                color: white;
                text-align: center;
                line-height: 35px;
                font-size: 30px;
            }
        </style>
    

      js

     <script src="JS/jquery-1.7.2.min.js"></script>
        <script src="JS/jquery.color.js"></script>
     <script type="text/javascript">
            $(document).ready(function () {
                $("#tc").click(function () {
                    ////取得浏览器的高度
                    //var llhei = window.innerHeight;
                    //var hei = $("body").outerHeight();
    
                    ////alert(hei);
                    ////alert(llhei);
    
                    ////如果body的高度小于浏览器高度,就把浏览器高度赋给hei
                    //if (hei < llhei) {
                    //    hei = llhei;
                    //}
    
                    $("#tc_zhezhao").css("display","inline-block");
       
                    $("#tc_zt").animate({ top: "180px" }, 100).animate({ top: "150px" }, 100);
                });
                $("#tc_zt_an").hover(function () {
                    $(this).css("backgroundColor", "white");
                    $(this).css("color", "black");
                }, function () {
                    $(this).css("backgroundColor", "black");
                    $(this).css("color", "white");
                });
                $("#tc_zt_an").click(function () {
                    $("#tc_zt").animate({ top: "180px" }, 100).animate({ top: "-500px" }, 100, function () {
                        $("#tc_zhezhao").css("display", "none");
                    });
                });
    
            });
        </script>
    

      body

    <input type="button" value="弹窗" id="tc" /><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 />
        <br />
        <div id="tc_zhezhao"></div>
        <div id="tc_zt">
            <div id="tc_zt_bt"></div>
            <div id="tc_zt_nr"></div>
            <div id="tc_zt_an">确  定</div>
        </div>
    

      

  • 相关阅读:
    给xml某个节点赋值
    把datatable的某些数据提取出来放在另一个表中
    投资技巧:抛股票有技巧 常用方法介绍
    jquery的实用技巧,非常实用
    我觉得需要关注和跟进的一些.net技术
    公司网站的架构
    uboot移植经历
    ARM处理器中CP15协处理器的寄存器
    uboot 学习 Makefile分析
    uboot移植
  • 原文地址:https://www.cnblogs.com/123lucy/p/5763818.html
Copyright © 2020-2023  润新知