day14 Python Css对话框

来源:互联网 发布:免费杀毒软件 知乎 编辑:程序博客网 时间:2024/05/23 13:27

1.让一个块元素充满整个屏幕:



.mode{
            width: 400px;
            height: 300px;
            background-color: green;
            position: fixed;
            top:50%;
            left: 50%;
            margin-left: -200px;
            margin-top: -150px;
            z-index: 1;  
        }


 .shaddow{
            position: fixed;  #这样对话框的input就不能操作了 因为 z-index比shaddow小
            top:0;   #这是块元素窗口全覆盖代码
            left: 0;
            bottom: 0;
            right: 0;
            background-color: black;

opacity: 0.6;  #透明度
            z-index: 8; #莫泰对话框 


        }


<div class="shaddow">

<input type="text">
        <input type="text">
        <input type="text">
        <input type="text">
        <input type="text">


</div>
<div class="mode">   </div>



0 0
原创粉丝点击