CSS-implemented Div imitation textarea Effect

Source: Internet
Author: User
<! 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.