赣州建站资讯网

为消费者提供更优质的体验

纯css实现渐变动画背景

html代码:

<div class="d-flex flex-column justify-content-center w-100 h-100">

  <div class="d-flex flex-column justify-content-center align-items-center">
    <h1 class="fw-light text-white m-0">Pure CSS Gradient Background Animation</h1>
  </div>
</div>

css样式:

@import url("https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/twitter-bootstrap/5.0.0-alpha1/css/bootstrap.min.css");
body {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  height: 100vh;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


- END -
声明:文字图片等素材除标明原创外均来源于网络,如有侵权,请及时告知我们,我们将在最短的时间内删除!

相关推荐

微信公众平台:圆狐创意

关注圆狐创意微信公众平台浏览最新资讯

更多媒体及商务合作

QQ:295939675   或  至电:198-6662-0460