Thuộc tính background được dùng để định dạng nền cho thành phần.
.box { *background-color: #5cb85c; }
.box { *background: linear-gradient(90deg, #ff0000, #0000ff); }
.box { *background: radial-gradient(ellipse at center, red 0%, yellow 100%); }
.box { *background-image: url(demo.png); }
.box { *background-image: url(demo.png); *background-repeat: repeat-x; }
.box { *background-image: url(demo.png); *background-repeat: repeat-y; }
.box { *background-image: url(demo.png); *background-repeat: no-repeat; }
.box { *background-image: url(demo.png); *background-repeat: no-repeat; *background-position: 100px 50px; }
.box { *background-image: #ff0000 url(demo.png); *background-repeat: no-repeat; *background-position: 100px 50px; }
.box { *background-image: url(demo.png); *background-repeat: no-repeat; *background-position: center center; }
.box { *background-image: url(demo.png); *background-repeat: no-repeat; *background-position: center center; *background-size: cover; }
.box { *background-image: url(demo.png); *background-repeat: no-repeat; *background-position: center center; *background-size: contain; }
.box { *background-image: url(demo.png); *background-position: center center; *background-size: 100% 50%; }
.box { *background: url(demo.png) top left no-repeat, url(bg.png) bottom right no-repeat; *background-size: 100px, auto; *background-color: #ff0000; }