• Jquery开灯关灯效果


    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script src="file:///E|/课程视频/0103Jquery/Jquery/jquery-1.11.2.min.js"></script>
    <style type="text/css">
    #zz{width:100%; height:100%; position:absolute; left:0px; top:0px; background-color:black; z-index:5;filter:alpha(opacity=50); 
    -moz-opacity:0.5; 
    -khtml-opacity: 0.5; 
    opacity: 0.5;}
    </style>
    </head>
    
    <body>
    <div id="shang" style="position:absolute; z-index:10; left:100px; top:100px;">
    <input type="button" value="关灯" id="guan" />
    <input type="button" value="开灯" id="kai" />
    </div>
    </body>
    <script type="text/javascript">
    $("#guan").click(function(){
            var str = "<div id='zz'></div>";
            $("body").append(str);
            $(this).css("display","none");
            $("#kai").css("display","block");
        })
    $("#kai").click(function(){
            $("#zz").remove();
            $("#guan").css("display","block");
            $(this).css("display","none");
        })
    
    </script>
    </html>
  • 相关阅读:
    219. Contains Duplicate II
    189. Rotate Array
    169. Majority Element
    122. Best Time to Buy and Sell Stock II
    121. Best Time to Buy and Sell Stock
    119. Pascal's Triangle II
    118. Pascal's Triangle
    88. Merge Sorted Array
    53. Maximum Subarray
    CodeForces 359D Pair of Numbers (暴力)
  • 原文地址:https://www.cnblogs.com/chaochao00o/p/6251455.html
Copyright © 2020-2023  润新知