WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
×

CSS Reference

CSS Reference CSS Selectors CSS Functions CSS Reference Aural CSS Web Safe Fonts CSS Animatable CSS Units CSS PX-EM Converter CSS Colors CSS Color Values CSS3 Browser Support

CSS Properties

align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-shadow box-sizing caption-side clear clip color column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset cursor direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-size font-size-adjust font-stretch font-style font-variant font-weight hanging-punctuation height justify-content @keyframes left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-bottom margin-left margin-right margin-top max-height max-width @media min-height min-width nav-down nav-index nav-left nav-right nav-up opacity order outline outline-color outline-offset outline-style outline-width overflow overflow-x overflow-y padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin position quotes resize right tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-style text-indent text-justify text-overflow text-shadow text-transform top transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi vertical-align visibility white-space width word-break word-spacing word-wrap z-index



 

CSS background Property


Example

Set diverse foundation properties in one declaration:

body {
    foundation: #00ff00 url("welookupsS.gif") no-rehash fixed focus;
}

Definition and Usage

The foundation shorthand property sets all the foundation properties in one declaration.

The properties that can be set, are: foundation shading, foundation picture, foundation position, foundation measure, foundation rehash, foundation beginning, foundation clasp, and foundation attachment.

It does not make a difference on the off chance that one of the qualities above are missing, for example background:#fff000 url(smiley.gif.gif); is allowed.

Default value: see individual properties
Inherited: no
Animatable: yes, see individual properties. animatable
Version: CSS1 + new properties in CSS3
JavaScript syntax: object.style.background="red url(smiley.gif) upper left no-repeat"

Browser Support

The numbers in the table indicate the primary program form that completely underpins the property.

Property
background 22.0 28.0 30.0 35.0 40.0 30.5

Note: Internet Explorer 8 and prior adaptations don't bolster different foundation pictures on one element.

Note: See singular program support for each esteem below.


CSS Syntax

foundation: color picture position/measure rehash starting point cut connection initial|inherit;

Note: If one of the properties in the shorthand statement is the foundation estimate property, you should utilize a/(slice) to isolate it from the foundation position property, for example background:url(smiley.gif) 10px 20px/50px; will result in a foundation picture, situated 10 pixels from the left, 20 pixels from the best, and the measure of the picture will be 50 pixels wide and 50 pixels high.

Property Values

Value Description CSS
foundation color Specifies the foundation shading to be used 1
foundation image Specifies ONE or MORE foundation pictures to be used 1
foundation position Specifies the situation of the foundation images 1
foundation size Specifies the measure of the foundation images 3
foundation repeat Specifies how to rehash the foundation images 1
foundation origin Specifies the situating region of the foundation images 3
foundation clip Specifies the work of art zone of the foundation images 3
foundation attachment Specifies whether the foundation pictures are fixed or looks with whatever is left of the page 1
initial 4
2