-1
我想爲我的應用程序創建一個bootstrap accordion
。我的父元素也有背景顏色。我的問題是,當我擴大accordions
時,它擴展了我的頁面高度,背景顏色不包含擴展區域。如何在我的情況下設置一個元素的背景顏色
我的HTML
<div id='wrapper>
<accordion id='accordion' close-others="false">
<accordion-group>
<accordion-heading >
<h2 class='title'>Title 1</h2>
</accordion-heading>
<div id="first" class="panel-collapse collapse in">
//contents...
</div>
</accordion-group>
//I have 5 to 6 accordion group.
</accordion>
</div>
CSS:
//I used height:100% and it looks fine when the page first loaded but not after //user //expand all the accordion.
#wrapper{
background-color: red;
height: 100%;
display: block;
}
誰能幫我一下嗎?非常感謝!
使搗鼓您的問題,使人們可以在它的工作。 –
嘗試向#wrapper添加「overflow:hidden;」。聽起來像有可能是一個沒有被包含的浮動。或者,在手風琴之後添加'
'*。 –你也有一些奇怪的HTML元素。一般來說,製作自己的作品並不是一個好主意。 –