模式DIV。

JS:
<script> 
//模式DIV开始
    function opendivshow(width, title, href) {
        document.getElementById('lightshow').style.display = 'block';
        document.getElementById('lightshow').style.width = width + "px";
        document.getElementById('lightshow').style.marginLeft = -(width / 2) + "px";
        document.getElementById('messagebox').style.width = width + "px";
        document.getElementById('fadeshow').style.display = 'block';
        $("#showdiv1").hide();
        $("#showdiv2").hide();
        $("#" + title).show();
    }
    function closedivshow() {
        document.getElementById("lightshow").style.display = 'none';
        document.getElementById("fadeshow").style.display = 'none';
    }
    //模式DIV结束
</script>

页面上:
 <div id="lightshow" class="div_content">
        <div id="messagebox" class="div_messageshow">
        </div>
        <div class="div_main">
            <span id="spIndexMemberTaobaoList">请选择买号:
            </span>
            <br />
            <div style="width: 160px; height: 30px; line-height: 30px; text-align: center; cursor: pointer;"><span style="background-color: #ccc; width: 30px; height: 30px;" οnclick="SureToTakeOver();javascript:closedivshow();">确 定</span><span style="width: 30px; height: 30px; margin-left: 15px; background-color: #ccc;" οnclick="javascript:closedivshow();">取 消</span></div>
        </div>
    </div>
    <div id="fadeshow" class="div_overlay"></div>
    <a id="showczm" οnclick="javascript:opendivshow('300','','javascript:closedivshow()')"></a><%--showczm111111111输入操作码暂时隐藏--%>

样式

 /*模式DIV开始*/
.div_overlay{
            display: none;
            position: fixed;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            background-color: black;
            z-index:1010;
            -moz-opacity: 0.8;
            opacity:.80;
            filter: alpha(opacity=80);
}
.div_content {
            display: none;
            position: fixed;
            top: 30%;
            left: 50%;
            width: 280px;
margin-left:-140px;
            height: 550px;
margin-top:-80px;
            padding: 0;
            border: 12px solid #3777BC;
            background-color: #F0F5F8;
            _position:absolute;
            z-index:1011;
            overflow: hidden;
}

.div_messageshow
{
height:0px;
width:280px;
line-height:0px;
text-align:center;
margin:0 auto;
color:#000;
font-size:13px;
font-weight:bold;
overflow:hidden;
margin-top:10px;
}

.div_main
{
width:160px;
margin:0 auto;
text-align:center;
line-height:25px;
height:50px;
margin-top:5px;
padding:0;
}
 /*模式DIV结束*/

 

转载于:https://www.cnblogs.com/wybshyy/p/5847923.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值