1. css背景图片每3秒自动切换
<div class="change">
  </div>
  <style>
    .change {
      animation: change 9s steps(1) infinite;
      background-repeat: no-repeat;
      background-position: center center;
      background-size: 100% auto;
      width: 200px;
      height: 100px;
    }
    @keyframes change {
      0% {
        background-image: url(https://www..com/img/PCtm_.png);
      }
      33% {
        background-image: url(https://www.hongwei.site/img/201809/s1.png);
      }
      66% {
        background-image: url(https://p4.ssl.qhimg.com/t01fcaa9d8a4d24b5f1.png)
      }
    }
  </style>
纯 css 每3秒播一张图片。9s是总共时间,如果是4张图片这里写 12s
2. 如何在CSS代码中把背景颜色改成浅蓝色分都给了!
需要准备的材料分别有:电脑、浏览器、html编辑器。
1、首先,打开html编辑器,新内建html文件,例如:index.html。
