This chapter is the main role of C s S
After the previous chapter introduces the method and some characteristics of the declaration and application, from this chapter, it is necessary to officially enter the CSS instruction! This chapter has two introductions themes. The first part introduces the color and background-nature CSS, its main role is the nature of the set of the foreground color, background color and background graphics, etc.; Some of the document describes the CSS instructions for controlling the location of the elements.
Color back view C s command
Color Settings Prospect Color
stand by:
IE3, IE4, NC4
Be applicable:
All elements
Possible value:
default value:
Depending on the browser
Inheritance:
Have
General Example: span {color: blue}
Coaxial example:
Background-color set background color
stand by:
IE4, NC4
Be applicable:
All elements
Possible value:
default value:
TRANSPARENT
Inheritance:
no
General Example: Body {Background-Color: Blue}
Coaxial example:
Background-Image Setting Background Graphics
stand by:
IE4, NC4
Be applicable:
All elements
Possible value:
default value:
TRANSPARENT
Inheritance:
no
General example:
Body {Background-Image: URL ("http:// YourWeb / Path / file_name")}
Coaxial example:
Background-repeat setting background Repeat
stand by:
IE4, NC4
Be applicable:
All elements
Possible value:
Repeat Repeat Background Graphics Fills Page REPEAT-X Horizontal Direction Background Graphics Repeat-Y Vertical Direction Repeat Background Graphic NO-REPEAT Do Not Repeat Background Graphics
default value:
Repeat
Inheritance:
no
General Example: Body {Background-Repeat: Repeat-x}
Coaxial example:
Background-attachment setting background attachedstand by:
IE4, NC4
Be applicable:
All elements
Possible value:
Scroll background graphic with the reel rolling fixed background graphic with the reel roller (floating water)
default value:
scrol
Inheritance:
no
General Example: Body {Background-attachment: fixed}
Coaxial example:
Background-position set background location
stand by:
IE4, NC4
Be applicable:
Block element
Possible value:
default value:
0% 0%
Inheritance:
no
General Example: Body {Background- Position: 100% 50%}
Coaxial example:
Background integrated set background nature
stand by:
IE3, IE4, NC4
Be applicable:
All elements
Possible value:
Background-Color Set Background Color Background-Image Setting Background Graphics Background-Repeat Set Background Repeat Background-Attachment Set Background Attach Background-Position Set Background Location
default value:
no
Inheritance:
no
General example:
Body {Blue URL (Image / GIF) REPEAT-X Fixed Center}
Coaxial example:
Position of the C s S command
Float sets floating properties (mostly used for texture)
stand by:
IE4, NC4
Be applicable:
Block elements or graphics
Possible value:
Left elements are left, text around its right Right element, text around its left none in a preset method
default value:
None
Inheritance:
no
General example: div {float: Right}
Coaxial example:
CLEAR sets the clear nature (setting if the floating element is allowed)
stand by:
IE4
Be applicable:
Block elements or graphics
Possible value:
Both If there is a floating element on both sides, the element is moved to the floating element. If there is a floating element on the left, the element is moved to the floating element. If there is a floating element on the right, the element is moved to the floating element NONE to preset Method display
default value:
None
Inheritance:
no
General Example: Div {CLEAR: RIGHT}
Coaxial example:
Width setting width
stand by:
IE4, NC4
Be applicable:
Block elements or graphics
Possible value:
default value:
Auto
Inheritance:
no
General example: div {width: 300pt}
Coaxial example:
HEIGHT setting height
stand by:
IE4, NC4
Be applicable:
Block elements or graphics
Possible value:
default value:
Auto
Inheritance:
no
General Example: Div {Height: 300pt}
Coaxial example:
Position setting location
stand by:
IE4, NC4
Be applicable:
Block element
Possible value:
Absolute is based on the parent element, and it is averaged in a particular location in a specific location. The static preset position is set at a specific location, and the element is located in the original code.
default value:
Absolute
Inheritance:
no
General Example: DIV {Position: static}
Coaxial example:
TOP setting top position
stand by:
IE4, NC4
Be applicable:
Block element
Possible value:
default value:
Auto
Inheritance:
no
General example: div {TOP: 30pt}
Coaxial example:
LEFT sets the left end position
stand by:
IE4, NC4
Be applicable:
Block element
Possible value:
Auto
Inheritance:
no
General Example: Div {Left: 30pt}
Coaxial example:
CLIP setting crop (set a region shape and size, outside the area)
stand by:
IE4, NC4
Be applicable:
Block element
Possible value:
RECT (TOP, Right, Bottom, Left) Set the left length of the lower right below the rectangle, which will automatically align the pairs of edges to RECT (0, length, length, 0) cannot be written as REC (0, 0, The length, length) can be "auto" instead of the AUTO display
default value:
Auto
Inheritance:
no
General Example: Div {Clip: Rect (0,100px, 50px, 0)}
Coaxial example:
OVERFLOW Setting the overhead process (Control When the content of the element exceeds the size of the element)
stand by:
IE4
Be applicable:
Block element
Possible value:
The Visible element will not be displayed in the set size display, and you can see that all content Hidden's partial part of the unit will be hidden. Scroll is not necessary. Scroll is necessary. If necessary, the can be allowed to see all of the content auto Preset method display
default value:
Auto
Inheritance:
no
General Example: Div {Overflow: scroll}
Coaxial example:
Visibility Sets the visibility
stand by:
IE4, NC4
Be applicable:
All elements
Possible value:
Visible setting This element shows that Hidden settings that the element is not displayed, but still occupying the space inherit to determine the visibility of the parent element.
default value:
inherit
Inheritance:
no
General Example: Div {Visibility: hidden}
Coaxial example:
Z-index sets z-axis parameters (three degree space)
stand by:
IE4, NC4
Be applicable:
Block element
Possible value:
default value:
Auto
Inheritance:
no
General Example: Div {Z-Index: 3}
Coaxial example: