css实现背景图片网格动画轮换切换动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现背景图片网格动画轮换切换动画效果代码

代码标签: css 背景 图片 网格 动画 轮换 切换 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
<style>

body,
html {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #0c1016;
  font-size: 20px;
  margin: 0;
  padding: 0;
  color: #ffffff;
  font-family: "Roboto";
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

:root {
  --image-1: url(//repo.bfw.wiki/bfwrepo/image/63ddac36d5cf6.png);
  --image-2: url(//repo.bfw.wiki/bfwrepo/image/63e07ead99e9b.png);
  --image-3: url(//repo.bfw.wiki/bfwrepo/image/63e455adbc716.png);
}

.container {
  display: flex;
  flex-direction: row;
  width: 80%;
  max-width: 20rem;
  gap: 0.5rem;
}
.container .column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: inherit;
  width: 100%;
}
.container .column-1 .item-1 {
  height: 4rem;
  -webkit-animation: background 5s 150ms infinite ease-in-out;
          animation: background 5s 150ms infinite ease-in-out;
}
.container .column-1 .item-2 {
  height: 6rem;
  -webkit-animation: background 5s 274ms infinite ease-in-out;
          animation: background 5s 274ms infinite ease-in-out;
}
.container .column-1 .item-3 {
  height: 3rem;
  -webkit-animation: background 5s 350ms infinite ease-in-out;
          animation: background 5s 350ms infinite ease-in-out;
}
.container .column-2 .item-1 {
  height: 4rem;
  -webkit-animation: background 5s 150ms infinite ease-in-out;
          animation: background 5s 150ms infinite ease-in-out;
}
.container .column-2 .item-2 {
  height: 9rem;
  -webkit-animation: background 5s 274ms infinite ease-in-out;
          animation: background 5s 274ms infinite ease-in-out;
}
.container .column-2 .item-3 {
  height: 3rem;
  -webkit-animation: background 5s 350ms infinite ease-in-out;
          animation: background 5s 350ms infinite ease-in-out;
}
.container .column-3 .item-1 {
  height: 6rem;
  -webkit-animation: background 5s 280ms infinite ease-in-out;
          animation: background 5s 280ms infinite ease-in-out;
}
.container .col.........完整代码请登录后点击上方下载按钮下载查看

网友评论0