不说废话,直接上代码
设置div格式
 #div1{
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 99999;
    }
    #div1.div2{
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        background-color: #000;
        opacity: .3;
    }
        .div3{
        background-color:#F7F7F7;
        line-height:20px;
        border: 1px solid #0080FF;
        font-size: 12px;
        z-index:999;
        width: 150px;
        height: 150px;
        left:50%;
        top:25%;
        margin-left:-150px!important;/*FF IE7 该值为本身宽的一半 */
        margin-top:-60px!important;/*FF IE7 该值为本身高的一半*/
        margin-top:0px;
        position:fixed!important;/* FF IE7*/
        position:absolute;/*IE6*/
   }
    </style>
body中加入div并设置隐藏
<div id="div1" style="display:none;">
<div class="div2">
<div id="ylfj" class="div3" >
<img style="width:100%; height:100%;" src="${pageContext.request.contextPath}/images/loading.gif">
</div>
</div>
</div>
js中:
document.getElementById('div1').style.display='block';//显示出来
有结果后:
document.getElementById('div1').style.display='none';//隐藏掉
阅读前辈大作,整理所得,以便大家使用以及自己以后使用。若有不合适,望指正。
共勉,努力学习,一起进步。谢谢!
 
                    
                     
                    
                 
                    
                 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号