zoukankan      html  css  js  c++  java
  • 随手做的一个模拟弹出窗口

    CSS
     
    #cover_div{
    position: absolute;
    z-index: 999999;
    width: 100%;
    height: 100%;
    display: none;
    left: 0;
    top: 0;
    min-width: 700px;
    min-height: 740px;      
    opacity: 0.01;
    filter: alpha(opacity = 1);
    background-color: #fff; display: none;}
    #id_messages{
    height: 70px;
    padding: 0px 0px 0px 25px;
    margin-bottom: 0px;
    width: 240px;
    border-radius: 5px;
    background-color: #FFF;
    position: absolute;
    z-index: 9999999;
    left: 50%;
    margin-left: -120px;
    top: 40%;
    border: 1px solid #6699CC;
    height /***/: 70px9;
    display: none;
    }
    #b_txt{
    color: #fff;
    background-color: #6699CC;
    margin-top: -25px;
    padding-left: 25px;
    display: block;
    margin-left: -26px;
    width: 100%;
    height: 25px;
    border-radius: 5px;
    border: 1px solid grey;}
     
    #td_btn{
    width: 60px;
    height: 60px;
    }
    HTML(建议放在最外层仅仅被body标签包裹)
     
    <input type="button" onclick="show()"   value="test"/>
     
    <div id="cover_div"></div>
     <div id="id_messages">
        <b id="b_txt">请输入用户名</b>
      <table>
       <tr>
        <td><input type="text" placeholder="请输入用户名"/></td>
        <td id="td_btn"><input  type="button" class="btn"  value="确定"  onclick="hide()" /></td>
       </tr>
      </table>
     
     </div>
     
    JQUERY
     
    function  show(){
      $("#cover_div").show();
      $("#id_messages").show();
    }
    function  hide(){
      $("#cover_div").hide();
      $("#id_messages").hide();
    }
    

     

    效果

  • 相关阅读:
    Objective C 总结(十):Conventions
    Objective C 总结(九):Errors
    iOS 关于传值
    iOS UIImage剪切圆形
    iOS 触摸的位置放一个大头针
    iOS开发之各种动画各种页面切面效果
    AFNetworking2.4.1 解析
    iOS网络协议----HTTP/TCP/IP浅析
    ios 开发日记 9
    ios开发日记
  • 原文地址:https://www.cnblogs.com/oospace/p/4234142.html
Copyright © 2011-2022 走看看