<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> textarea-like effect implemented by CSS </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<! -- Add the following code between <Style type = "text/CSS">
H1 {
Font: bold 1.2em/1.6em Arial;
Margin: 4px 0;
Padding: 4px 0;
}
H2 {
Font: normal 1.1em/1.5em Arial;
Margin: 14px 0 0 0;
Padding: 4px 0;
}
Div, P {
Font: normal 1em/1.3em Arial;
}
Div. terms {
Width: 600px;
Height: 200px;
Border: 1px solid # CCC;
Background: # f2f2f2;
Padding: 6px;
Overflow: auto;
}
Div. Terms P, Div. Terms Li {
Font: normal 11px/15px Arial;
Color: #333;
}
Div. Terms H3 {
Font: bold 14px/19px Arial;
Color: #000;
}
Div. Terms H4 {
Font: bold 12px/17px Arial;
Color: #000;
}
Div. terms strong {
Color: #000;
}
</Style>
</Head>
<Body>
<! -- Add the following code to the <body> and </body> -->
<H1> This is implemented using Div! </H1>
<Div class = "Terms">
<H3> Terms and Conditions <H4> General </H4>
<P> servicing resistor <strong> video computer </strong> element trancoder der prototype analog solution mainframe network. Solution video debugged feedback sampling extended, infrared, generator. </P>
<Ul>
<Li> <a href = "http://www.baidu.com"> list item number one </a> </LI>
<Li> list item number two </LI>
<Li> list item number three </LI>
</Ul>
<H4> fees </H4>
<P> reflective backbone log transmission cable logarithmic mainframe. messaging backbone debugged feedback development phaselock Metafile N-tier coordinated, cable coordinated in. <strong> analog device </strong> transistorized, sequential transistorized with scalar normalizing. mainframe phase cache anomoly feedback servicing harmonic. services software PC, femtosecond bypass scalar Data Element extended cascading capacitance harmonic. adaptive plasma bypass supporting cascading deviation system pulse broadband bridgeware. </P>
</Div>
</Body>
</Html>
Overflow
Visible overflow default value. The content will not be trimmed and will be displayed outside the element box.
The hidden content is trimmed and the rest of the content is invisible.
Scroll content is trimmed, but the browser displays a scroll bar to view other content.
If the content of auto is trimmed, the browser displays a scroll bar to view the remaining content.
Inherit specifies that the overflow attribute value should be inherited from the parent element.