背景写法案例

background:bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit;

颜色+图片
background: #ff5400 url() no-repeat;

渐变+图片
background: url() no-repeat right bottom, linear-gradient(to right, #424edc,#4185fb);

多图片
background: url() no-repeat left top, url() no-repeat right top, url() no-repeat left bottom, url() no-repeat right bottom;

多图片+颜色
background: url() no-repeat left top, url() no-repeat right top, url() no-repeat left bottom, url() no-repeat right bottom, #ff5400;

多图片+渐变
background: url() no-repeat left top, url() no-repeat right top, url() no-repeat left bottom, url() no-repeat right bottom, linear-gradient(to right, #424edc,#4185fb);

你可能感兴趣的:(背景写法案例)