css 背景自动缩放

默认情况下,背景属性是平铺的,如果背景图片较大,而box小,那么就只能显示左上角那块背景.如果要让背景全部显示出来,

.color_checked {
    float: right;
    width: 16px;
    height: 16px;
    background: url(../images/color_check.png) center 0 no-repeat;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}