anime+css实现随机方块圆圈立体摆放背景变动效果代码

代码语言:html

所属分类:背景

代码描述:anime+css实现随机方块圆圈立体摆放背景变动效果代码

代码标签: anime css 随机 方块 立体 圆圈 摆放 背景 变动

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">

<style>
    @import url("https://fonts.googleapis.com/css2?family=Roboto:300;400;500;700;900&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #202020;
}

.container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.container .block {
  position: absolute;
  width: 50px;
  height: 50px;
  background: #444;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
}
.container .block:nth-child(3n+1) {
  background: #283618;
}
.container .block:nth-child(3n+2) {
  background: #fefae0;
}
.container .block:nth-child(3n+3) {
  background: #ccd5ae;
}
.container button {
  position: relative;
  z-index: 1;
  margin: 10px;
  border: none;
  background: #fff;
  font-size: 1.2em;
  cursor: pointer;
  padding: 15px 30px;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.25);
}
.container.circle .block {
  border-radius: 50%;
}
</style>
</head>
<body>.........完整代码请登录后点击上方下载按钮下载查看

网友评论0