CSS tutorial for (www.bkjia.com). Today we will discuss the vertical adaptive problem of CSS, that is, vertical adaptive. Display effect when the content of an element exceeds the height defined by the element.
The following is the instance code:
Copy to ClipboardReference: [www.bkjia.com] <! 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>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> CSS vertical adaptive-Liehuo. Net </title>
<Style>
Div
{
Float: left;
Width: 200px;
Height: 40px;
Margin: 0 10px 0;
Border: 2px solid #000000;
}
</Style>
</Head>
<Body>
<Div> This is the content in the element. Note the display effect when the content of the element exceeds the height defined by the element. </Div>
<Div> </div>
</Body>
</Html>