急急急急急!求JS大神帮下忙。

2025-03-01 01:23:13
推荐回答(1个)
回答1:

$.blockUI({  
       message: "X",  
       css: {  
        top:  ($(window).height() - $("#pre")[0].offsetHeight) /2 + 'px', 
        left: ($(window).width() - $("#pre")[0].offsetWidth/2) /2 + 'px', 
        width: $("#pre")[0].offsetWidth + 'px',
        backgroundColor: '#fff',
        borderWidth:'3px',
        borderColor:'#fff'
       }  
      }); 
      $("#pre").remove();      
      $(".closeit").click(function(){
       $.unblockUI(); 
      });


message里加个X,然后可以写css让它出来想要的效果