css ie6 bug select遮擋問題

來源:互聯網
上載者:User
  1. <div id="grid_DropDwn" class="grid_DropDwn">  
  2. <iframe style="position:absolute;z-index:-1;display:none;"</iframe>  
  3. <div id="grid_DropMenu">  
  4. <ul><li></li></ul>  
  5. </div>  
  6. </div> 
  1. position:absolute  
  2.  
  3.   
  4. 是讓iframe和li所在的位置一樣,如果不加iframe就在li的上邊顯示  
  5.   
  6. z-index:-1  
  7.   
  8. 是讓iframe在li的底下.就是ul所在的div的下層  
  9.   
  10.   
  11. var grid_DropDwn=$('#grid_DropDwn')  
  12. $('#grid_DropDwn iframe').css({width:grid_DropDwn.width(),height:grid_DropDwn.height()}).show()  
  13.   
  14. 讓iframe的高和寬與li適應  
  15. 我這裡用得jquery.  
  16.   
  17.   
  18. $(".grid_DropDwn").css("display","none").find('iframe').hide();  
  19. 在menu需要隱藏的時候在將iframe隱藏就可以了  
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.