CSS
2, color and background properties
You don't want your page to be in a black-and-white world. Would it be better to add color to the text defined by the <font> attribute?
Now let's talk about the color and background properties of the CSS. Let's take a look at the colors and backgrounds under the CSS what are the properties of it (the following table):
Let's give an example. For example, the "LEAF" font mentioned in the previous section, where we add the color attributes, add the following code in <style>:
Color:rgb (204,82,28);
Background-img:url (ss01038.jpg);
Background-repeat:no-repeat;margin-right:15em
* Set the foreground color of the RGB value (204,82,28), you can also use the English name of the color directly defined;
Sets the address of the background pattern, sets the background pattern to not repeat, and also sets the margin margin property
We'll talk about this later, *//.
After adding the code, the "Leaf" font is displayed in this way (pictured below):
How, is not more beautiful than the definition of <font> attributes alone. Of course you can also easily define the background property (like defining the Font property), and let me tell you the writing format for the Background property:
Properties: Background Property value: <background-color>| | <background-image>| | <background-repeat>| | <background-attacement>| | <background-position>
That is, you can use the Background property to define all of the previously mentioned properties for the background, including background color, background pattern, and so on. Therefore, the code that defines the background in the "leaf" color attribute above can be written like this: "Background:url (ss01038.jpg) no-reapeat"
Well, as for the features of color and background properties, you can try it yourself. In the next section, we'll introduce the text properties of the CSS.