div {
/* 1.背景颜色 */
width: 400px;
height: 400px;
/* background-color: pink; */
/* 红绿蓝三原色,a是透明度0-1 */ /* background-color: rgba(0, 0, 0, 0.5); */
background-color: rgba(0, 0, 0, .5);
}
/* 2.背景图 */
p {
width: 1000px;
height: 1000px;
background-color: pink;
background-image: url(../img/6.jpg);
/* 2.1 背景图平铺【默认】 */
/* background-repeat: repeat; */
/* 不平铺 */
background-repeat: no-repeat;
/* x轴铺 */
/* background-repeat: repeat-x; */
/* y轴铺 */
/* background-repeat: repeat-y; */
/* 2.2 背景图位置 */
/* 右上角 */ /* background-position: right 0; */
/* 右下角 */ /* background-position: right bottom; */
/* 居中 */ /* background-position: center center; */
/* background-position: center; */
/* 正数:向右,向下移动 负数:向左向上移动 */
background-position: -100px -200px;
}
h1 {
width: 1000px;
height: 1000px;
/* 2.3 background: 背景色 背景图 背景图平铺 背景图位置【不分先后顺序】 */
/* 背景图位置如果是英文 可以颠倒 */
background: pink url(../img/7.jpg) no-repeat center bottom;
}