常用背景相关属性:

    image.png

    background-repeat取值范围:

    image.png

    background-attachment取值范围:

    image.png

    background-position取值范围:

    image.png

    示例:

    1. body {
    2. background-color: red;
    3. backgraound-image: url(xx.png);
    4. background-size: 300px 300px;
    5. background-repeat: no-repeat;
    6. background-position: center
    7. }

    简写:

    1. body {
    2. background: red url(xx.png) no-repeat fixed center/300px 300px;
    3. }