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.........完整代码请登录后点击上方下载按钮下载查看

网友评论0