Home  >  Article  >  Web Front-end  >  Example analysis of setting in HTML to automatically display scroll bars after the content in the div exceeds

Example analysis of setting in HTML to automatically display scroll bars after the content in the div exceeds

高洛峰
高洛峰Original
2017-03-06 17:15:101998browse

How to set the scroll bar to automatically display when the content in p exceeds the limit. The following is a detailed introduction to the specific implementation of how to automatically display the scroll bar when the content in p exceeds the limit. Friends who are interested should not miss it. In html pages, we sometimes need to automatically display the scroll bar after the content in p exceeds. We can set it like this:

The code is as follows:

<p class="classlist"> 
<p 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" /> 
</p> 
</p>


Then, the style Set like this:

The code is as follows:

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


After setting, when the content displayed in the radiobutton exceeds the outermost p, the scroll bar will be automatically displayed, that is, the embedded Set p

For more settings in HTML to automatically display the scroll bar after the content in the div exceeds the limit, please pay attention to the PHP Chinese website for related articles.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn