css div 高度自適應

來源:互聯網
上載者:User

 

css div 高度自適應其實初學者經常會碰到此類的問題,記得我以前就碰過這樣的問題嘍,問了好多朋友都沒辦法在foxfir 與ie下同時讓div高度自適應,下面是我經過反應的實驗得出來了代碼。

.all_block{


  width:900px;


  margin:0px auto;


  padding:12px 10px 0px 10px;


  background-color:#FFFFFF;  


  clear:both; position:relative;overflow:auto;height:auto; 


  voice-family:"""";


  voice-family:inherit;


  width:900px;  


  }

看到加粗那一段代碼了,這樣div就會自動適應高度哦。

好了也沒什麼說的了,手都打痛了轉載的朋友加我本站網站吧。www.111cn.net/cssdiv/css.html

相關文章

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.