11<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40/sgml/HTML4.dtd">
22<html lang="en">
3- <!-- $Id: colors.src,v 1.12 1997-09-08 23:53:14 ian Exp $ -->
3+ <!-- $Id: colors.src,v 1.13 1997-09-10 22:35:01 ian Exp $ -->
44<HEAD>
55<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66<TITLE>Colors and backgrounds</TITLE>
99<LINK rel="STYLESHEET" href="style/default.css" type="text/css">
1010</HEAD>
1111<BODY>
12- <H1 align="center"><a name="colors"> Colors</a> and <a name="backgrounds">backgrounds</a> </H1>
12+ <H1 align="center">Colors and Backgrounds </H1>
1313
14- <H2>Color and background properties</H2>
14+ <P>CSS properties allow authors to specify the foreground color and
15+ background of an element. Backgrounds may be colors or
16+ images. Background properties allow authors to position the image,
17+ repeated it, and declare whether it should be fixed or scrolled.
1518
16- <P> These properties describe the color (often called <EM>foreground
17- color</EM>) and background of an element (i.e., the surface onto which
18- the content is rendered). One can set a background color and/or a
19- background image. The position of the image, if/how it is repeated,
20- and whether it is fixed or scrolled relative to the canvas can also be
21- set.
19+ <P> See the section on <a href="./syndata.html#color-units">color units</a>
20+ for the syntax of legal color values.
2221
23- <P> The <span class="propinst-color">'color'</span> property inherits
24- normally. The background properties do not inherit, but the parent
25- element's background will shine through by default because of the
26- initial 'transparent' value on <span
27- class="propinst-background-color">'background-color'</span> .
22+ <H2><a name="colors">Foreground properties</a>
23+
24+ <P> The following property specifies the foreground color of an
25+ element's content. The <span class="propinst-color">'color'</span>
26+ property inherits normally .
2827
2928<H4><a name="propdef-color">'color'</a></H4>
3029<!-- #include src=properties/color.srb -->
3130
32- <P> This property describes the text color of an element (often
33- referred to as the <EM>foreground</EM> color). There are different
34- ways to specify red:
31+ <P> This property describes the foreground color of an element's text
32+ content. There are different ways to specify red:
3533
3634<PRE>
3735 EM { color: red } /* natural language */
3836 EM { color: rgb(255,0,0) } /* RGB range 0-255 */
3937</PRE>
4038
41- <P> See the section on <a href="./syndata.html#color-units">color units</a>
42- for a description of possible color values.
39+ <H2><a name="background-properties">Background properties</a><H2>
40+ Authors may specify the background of an element
41+ (i.e., its rendering surface) as either a color or an image.
42+
43+ <P>Background properties do not inherit, but the parent element's
44+ background will shine through by default because of the initial
45+ 'transparent' value on <span
46+ class="propinst-background-color">'background-color'</span>.
47+
48+ <P>In terms of the <a href="flowobj.html#box-model">box model</a>,
49+ "background" refers to the background of the content and the padding
50+ area. Border colors and styles are set with the <a
51+ href="flowobj.html#border-properties">border properties</a>. Margins
52+ are always transparent so the background of the parent element always
53+ shines through.
4354
4455<H4><a name="propdef-background-color">'background-color'</a></H4>
4556<!-- #include src=properties/background-color.srb -->
@@ -50,6 +61,7 @@ for a description of possible color values.
5061 H1 { background-color: #F00 }
5162</PRE>
5263
64+
5365<H4><a name="propdef-background-image">'background-image'</a></H4>
5466<!-- #include src=properties/background-image.srb -->
5567
0 commit comments