2012-05-05 22 views
0
body{ 
    background:#eff3f6; 
    border: 1px solid #C3D4DB; 
} 
.content{margin-top:1px; 
margin-right:200px; 
margin-left:200px; 
background:#fefefe;} 
.box 
{ 
    background:#fefefe; 
    border: 1px solid #C3D4DB; 
    border-top:1px; 
    -webkit-border-radius:5px; 
    -moz-border-radius:5px; 
    border-radius:5px; 
    -moz-box-shadow:rgba(0,0,0,0.15) 0 0 1px; 
    -webkit-box-shadow:rgba(0,0,0,0.15) 0 0 1px; 
    box-shadow:rgba(0,0,0,0.15) 0 0 1px; 
    color:#444; 
    font:normal 12px/14px Arial, Helvetica, Sans-serif; 
    margin:0 auto 30px ; 
    overflow:hidden; 
} 

我申請內容選擇父<div>類和箱選擇給孩子<div>類。現在它的應用正確。但是,每當內容超過一定數量時,全身內容就會消失。那麼我需要注意哪些財產?不能應用CSS成功

+0

[請展示您的代碼(http://jsfiddle.net/),也在這裏展示您的相關HTML。請記住:我們正在尋找[SSCCE(短自主正確/可編譯示例)](http://sscce.org/)。 –

+2

刪除溢出:隱藏。 –

回答

1

您可以刪除overflow: hidden或在下面的示例中添加height: auto以擴展.box div以涵蓋其所有內容。

.box { 
    background:#fefefe; 
    border: 1px solid #C3D4DB; 
    border-top:1px; 
    -webkit-border-radius:5px; 
     -moz-border-radius:5px; 
      border-radius:5px; 
    -webkit-box-shadow:rgba(0,0,0,0.15) 0 0 1px; 
     -moz-box-shadow:rgba(0,0,0,0.15) 0 0 1px; 
      box-shadow:rgba(0,0,0,0.15) 0 0 1px; 
    color:#444; 
    font:normal 12px/14px Arial, Helvetica, Sans-serif; 
    margin:0 auto 30px ; 
    overflow:hidden; 
    height: auto; /* This will expand the height of the container to contain all of its contents */ 
    } 
+0

雅感謝..但給'高度:汽車;'不工作......我刪除了'溢出:隱藏;'然後我的問題解決了。 – Raghuveer