HTML and CSS Reference
In-Depth Information
Attribute Description
background-color: color Defines the color of the background, where color is a CSS color
name or value; the keyword “inherit” can be used to inherit the
background color of the parent element, or “transparent”can
be used to allow the parent element background image to show
through
background-image: url( url ) Specifies the image file used for the element's background, where
url is the URL of the image file
background-origin: box
Specifies the origin of the background image, where box is
border-box, padding-box, or content-box (CSS3)
background-position: x y
Sets the position of a background image, where x is the horizontal
location in pixels, as a percentage of the width of the parent ele-
ment, or the keyword “left”, “center”, or “right”, y is the vertical
location in pixels, as a percentage of the height and of the parent
element, or the keyword, “top”, “center”, or “bottom”
background-repeat: type
Defines the method for repeating the background image,
where type is no-repeat, repeat (to tile the image in both
directions),repeat-x (to tile the image in the horizontal direction
only), or repeat-y (to tile the image in the vertical direction only)
Sets the size of the background image, where size is auto, cover,
contain, a length , or a percentage (CSS3)
background-size: size
Block-Level Styles
Styles applied to block-level elements
border: length style color
Defines the border style of the element, where length is the bor-
der width, style is the border design, and color is the border color
border-bottom: length
style color
Defines the border style of the bottom edge of the element
border-left: length
style color
Defines the border style of the left edge of the element
border-right: length
style color
Defines the border style of the right edge of the element
border-top: length
style color
Defines the border style of the top edge of the element
border-color: color Defines the color applied to the element's border using a CSS
color unit
border-bottom-color: color Defines the color applied to the bottom edge of the element
border-left-color: color Defines the color applied to the left edge of the element
border-right-color: color Defines the color applied to the right edge of the element
border-top-color: color Defines the color applied to the top edge of the element
border-image: url( url ) size Sets an image file for the border, where url is the location of the
image file and size is stretch, repeat, round, none, a length , or a
percentage (CSS3)
border-style: style Specifies the design of the element's border (dashed, dotted
double, groove, inset, none, outset, ridge, or solid)
border-style-bottom: style Specifies the design of the element's bottom edge
border-style-left: style Specifies the design of the element's left edge
border-style-right: style Specifies the design of the element's right edge
border-style-top: style Specifies the design of the element's top edge
border-radius: tr br bl tl Specifies the radius of the border corners in pixels, where tr is the
top-right corner, br is the bottom-right corner, bl is the bottom-
left corner, and tl is the top-left corner (CSS3)
Search WWH ::




Custom Search