csss实现催眠动画

代码语言:html

所属分类:动画

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

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

<title>100 days CSS #44</title>
<style>
      body {
  margin: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  font-size: 14px;
}

.background {
  position: relative;
  background: linear-gradient(to bottom, #404556 0%, #222 100%);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.25);
  width: 600px;
  height: 600px;
  cursor: pointer;
}

.background:hover {
  animation: none;
}

.rectangle {
  position: absolute;
  border: 1px solid white;
}

.rec-1 {
  height: 200px;
  width: 200px;
  border-color: #4e4e4e;
  animation: rotate 2s ease-in-out 0.0333333333s alternate infinite;
}

.rec-2 {
  height: 190px;
  width: 190px;
  border-color: #565656;
  animation: rotate 2s ease-in-out 0.0666666667s alternate infinite;
}

.rec-3 {
  height: 180px;
  width: 180px;
  border-color: #5e5e5e;
  animation: rotate 2s ease-in-out 0.1s alternate infinite;
}

.rec-4 {
  height: 170px;
  width: 170px;
  border-color: #666666;
  animation: rotate 2s ease-in-out 0.1333333333s alternate infinite;
}

.rec-5 {
  height: 160px;
  width: 160px;
  border-color: #6e6e6e;
  animation: rotate 2s ease-in-out 0.1666666667s alternate infinite;
}

.rec-6 {
  height: 150px;
  width: 150px;
  border-color: #767676;
  animation: rotate 2s ease-in-out 0.2s alternate infinite;
}

.rec-7 {
  height: 140px;
  width: 140px;
  border-color: #7e7e7e;
  animation: rotate 2s ease-in-out 0.2333333333s alternate infinite;
}

.rec-8 {
  height: 130px;
  width: 130px;
  border-color: #868686;
  animation: rotate 2s ease-in-out 0.2666666667s alternate infinite;
}

.rec-9 {
  height: 120px;
  width: 120px;
  border-color: #8e8e8e;
  animation: rotate 2s ease-in-out 0.3s alternate infinite;
}

.rec-10 {
  height: 110px;
  width: 110px;
  border-color: #969696;
  animation: rotate 2s ease-in-out 0.3333333333s alternate infinite;
}

.rec-11 {
  height: 100px;
  width: 100px;
  border-color: #9e9e9e;
  animation: rotate 2s ease-in-out 0.3666666667s alternate infinite;
}

.rec-12 {
  height: 90px;
  width: 90px;
  border-color: #a6a6a6;
  animation: rotate 2s ease-in-out 0.4s alternate infinite;
}

.rec-13 {
  height: 80px;
  width: 80px;
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0