当我们给网页添加图片时,css样式一般会使用:

.title {
  width: 100%;
  height: 500px;
  line-height: 50px;
  outline: 1px dashed red;
  background-color: rgba(255, 0, 0, 2);
  background-image: url(./img/ee0bb6c8ab9e26c5bb03c819154ef7cb.jpg);
  /* 不要平铺(会产生多个图片 */
  background-repeat: no-repeat;
  /* 水平居中 */
  background-position: center center;
}

其中背景颜色、插入图片、不要平铺、水平居中可以简写为:

background: rgba(255, 0, 0, 2) url(./img/ee0bb6c8ab9e26c5bb03c819154ef7cb.jpg) no-repeat center center;

代码演示:
202101111610335503489422