CSS style analysis: foreground, background, and border. Foreground color: color. Impact of color on border:
Reference content is as follows: <P style = "width: 100px; height: 100px; color: # F00; border-style: dotted; background: # 03C;"> foreground color affects the border color </p> |
The color of the front border is the same as that of the color of the p border.
Background: The background area of an element contains all the spaces under the foreground that know the outer border of the border, including the content frame and inner margin, and extends to the border. The following code:
Reference content is as follows: <! 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 = GBK"/> <Title> CSS style analysis: foreground color, background, and border-LIEHUO. NET </title> </Head>
<Body> <Div style = "width: 100px; height: 200px; margin: 100px auto; background: # 03C; border: 5px dotted # FC0;"> Border problems! </Div>
</Body> </Html>
|