欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

html中設(shè)置讓div中的內(nèi)容超出后自動顯示滾動條

  發(fā)布時間:2014-02-18 10:49:26   作者:佚名   我要評論
html中如何設(shè)置超出部分自動顯示滾動條,下面為大家詳細(xì)介紹下讓div中的內(nèi)容超出后自動顯示滾動條具體實(shí)現(xiàn),感興趣的朋友不要錯過

在html頁面中,我們有時需要讓div中的內(nèi)容超出后自動顯示滾動條,我們可以這樣設(shè)置:


復(fù)制代碼
代碼如下:

<div class="classlist">
<div class="autoScroll">
<asp:RadioButtonList ID="rblClasses" runat="server" DataTextField="className" DataValueField="classID"
ForeColor="#FF4040">
</asp:RadioButtonList>

<asp:ImageButton ID="imgSure" runat="server" ImageUrl="~/images/c_sure.jpg" />
<asp:ImageButton ID="imgClose" runat="server" ImageUrl="~/images/c_close.jpg" />
</div>
</div>

然后,樣式中這樣設(shè)置:


復(fù)制代碼
代碼如下:

<style type="text/css">
.classlist
{
width: 300px;
height: 20px;
}
.autoScroll
{
width:300px;
height:100px;
overflow:auto;
}
#rblClasses
{
margin-left: 20px;
}
</style>

設(shè)置后,當(dāng)radiobutton中顯示的內(nèi)容超出最外圍的div時,將自動顯示滾動條,即嵌套div

相關(guān)文章

最新評論