1background-image: url("image.png");
2background-position: center;
3background-repeat: no-repeat;
4background-size: cover;
1.wrapper {
2 background: url('./images/homeBg.png') no-repeat;
3 background-size: 100vw;
4 float: left;
5 height: 100vw;
6 width: 100vw;
7}
1div {
2 background-color: #ffffff;
3 background-image: url("img_tree.png");
4 background-repeat: no-repeat;
5 background-attachment: scroll|fixed|local|initial|inherit;
6 background-position: right top | x% y% | xpos ypos;
7 background-clip: border-box|padding-box|content-box|initial|inherit;
8 background-size: auto|length|cover|contain|initial|inherit;
9}
10//shorthand:
11div {
12 background: #ffffff url("img_tree.png") no-repeat right top;
13}
1/*Transparent Background Image*/
2
3background: linear-gradient(rgba(0,0,0,0.5),
4 rgba(0, 0, 0, 0.5)), url(milano-gallery.jpg) no-repeat center center fixed;
5 background-size: cover;
6/*
7Fills entire page with image, no white space
8Scales image as needed
9Retains image proportions (aspect ratio)
10Image is centered on page
11Does not cause scrollbars
12As cross-browser compatible as possible
13*/