CSS

Getting Started Selectors Background Transform Transition Grid Filter Fonts Dead Center SASS Mobile (@media) Animation Print ***
O O

Weather Controls

Time Of Day
Rain
Wind Speed
Wind Direction
Clouds

CSS : Background

2022-07-20

Background

Sets all the background properties in one declaration.

background: url("/images/background_sample_ball.png") scroll repeat-x  center center #A3F393;

Background Attachment

Sets whether a background image is fixed or scrolls with the rest of the page. Options: scroll (default), fixed, inherit

background-attachment: fixed; 

Background Repeat

Sets if/how a background image will be repeated. Options: no-repeat, repeat-x, repeat-y, repeat

background-repeat: repeat-y;
background-repeat: repeat;
background-repeat: no-repeat;

Background Position

Left value is X axis. Right value is Y axis.

Options: left, center, right, top, center, bottom, 50%, 100px, inherit

background-position: left bottom;
background-repeat: no-repeat;

Background Color

Sets the background color of an element (if image is used then behind the image).

Options: transparent (default), #777777, blue, rgba(200, 54, 54, 0.5), inherit

background-color:#1bffff;

background-clip

Says whether background shows behind the border/padding or not. Options: padding-box, border-box(default), content-box. no ie8

background-clip: content-box;
padding: 10px;

background-origin

Specify the size of a background image with "auto" and in pixels. no ie8.

Options: auto (default), 100px, 50%, contain (resize to fit full img), cover(resizes to max)

background-size: 100px 83px;
background-repeat: no-repeat;