div+css实现螺旋状催眠动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现螺旋状催眠动画效果代码

代码标签: div css 螺旋 催眠 动画

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    body {
  background: radial-gradient(circle, #131111 0%, black 17%, black 27%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  flex-direction: column;
  transform: scale(0.8);
  position: relative;
}

.wrapp {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transform-style: preserve-3d;
  animation: rotateWrapp 20s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes rotateWrapp {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
hr:nth-child(1) {
  animation-delay: 0.1s;
  border: 1px solid rgba(111, 73, 233, 0.5);
  background: rgba(139, 51, 255, 0.1);
}
hr:nth-child(1)::before {
  content: "1";
}
hr:nth-child(1)::after {
  content: "1";
}

hr:nth-child(2) {
  animation-delay: 0.2s;
  border: 1px solid rgba(243, 63, 147, 0.5);
  background: rgba(146, 51, 255, 0.1);
}
hr:nth-child(2)::before {
  content: "2";
}
hr:nth-child(2)::after {
  content: "2";
}

hr:nth-child(3) {
  animation-delay: 0.3s;
  border: 1px solid rgba(51, 255, 78, 0.5);
  background: rgba(85, 51, 255, 0.1);
}
hr:nth-child(3)::before {
  content: "3";
}
hr:nth-child(3)::after {
  content: "3";
}

hr:nth-child(4) {
  animation-delay: 0.4s;
  border: 1px solid rgba(65, 51, 255, 0.5);
  background: rgba(238, 51, 255, 0.1);
}
hr:nth-child(4)::before {
  content: "4";
}
hr:nth-child(4)::after {
  content: "4";
}

hr:nth-child(5) {
  animation-delay: 0.5s;
  border: 1px solid rgba(61, 255, 51, 0.5);
  background: rgba(223, 83, 216, 0.1);
}
hr:nth-child(5)::before {
  content: "5";
}
hr:nth-child(5)::after {
  content: "5";
}

hr:nth-child(6) {
  animation-delay: 0.6s;
  border: 1px solid rgba(83, 167, 223, 0.5);
  background: rgba(78, 216, 228, 0.1);
}
hr:nth-child(6)::before {
  content: "6";
}
hr:nth-child(6)::after {
  content: "6";
}

hr:nth-child(7) {
  animation-delay: 0.7s;
  border: 1px solid rgba(51, 71, 255, 0.5);
  background: rgba(51, 255, 187, 0.1);
}
hr:nth-child(7)::before {
  content: "7";
}
hr:nth-child(7)::after {
  content: "7";
}

hr:nth-child(8) {
  animation-delay: 0.8s;
  border: 1px solid rgba(51, 255, 221, 0.5);
  background: rgba(51, 85, 255, 0.1);
}
hr:nth-child(8)::before {
  content: "8";
}
hr:nth-child(8)::after {
  content: "8";
}

hr:nth-child(9) {
  animation-delay: 0.9s;
  border: 1px solid rgba(53, 170, 253, 0.5);
  background: rgba(51, 255, 136, 0.1);
}
hr:nth-child(9)::before {
  content: "9";
}
hr:nth-child(9)::after {
  content: "9";
}

hr:nth-child(10) {
  animation-delay: 1s;
  border: 1px solid rgba(85, 196, 221, 0.5);
  background: rgba(245, 61, 83, 0.1);
}
hr:nth-child(10)::before {
  content: "10";
}
hr:nth-child(10)::after {
  content: "10";
}

hr:nth-child(11) {
  animation-delay: 1.1s;
  border: 1px solid rgba(77, 230, 130, 0.5);
  background: rgba(51, 109, 255, 0.1);
}
hr:nth-child(11)::before {
  content: "11";
}
hr:nth-child(11)::after {
  content: "11";
}

hr:nth-child(12) {
  animation-delay: 1.2s;
  border: 1px solid rgba(233, 73, 169, 0.5);
  background: rgba(59, 119, 247, 0.1);
}
hr:nth-child(12)::before {
  content: "12";
}
hr:nth-child(12)::after {
  content: "12";
}

hr:nth-child(13) {
  animation-delay: 1.3s;
  border: 1px solid rgba(169, 86, 220, 0.5);
  background: rgba(51, 255, 112, 0.1);
}
hr:nth-child(13)::before {
  content: "13";
}
hr:nth-child(13)::after {
  content: "13";
}

hr:nth-child(14) {
  animation-delay: 1.4s;
  border: 1px solid rgba(88, 51, 255, 0.5);
  background: rgba(51, 146, 255, 0.1);
}
hr:nth-child(14)::before {
  content: "14";
}
hr:nth-child(14)::after {
  content: "14";
}

hr:nth-child(15) {
  animation-delay: 1.5s;
  border: 1px solid rgba(55, 104, 251, 0.5);
  background: rgba(51, 255, 214, 0.1);
}
hr:nth-child(15)::before {
  content: "15";
}
hr:nth-child(15)::after {
  content: "15";
}

hr:nth-child(16) {
  animation-delay: 1.6s;
  border: 1px solid rgba(84, 222, 204, 0.5);
  background: rgba(74, 232, 80, 0.1);
}
hr:nth-child(16)::before {
  content: "16";
}
hr:nth-child(16)::after {
  content: "16";
}

hr:nth-child(17) {
  animation-delay: 1.7s;
  border: 1px solid rgba(51, 146, 255, 0.5);
  background: rgba(51, 255, 156, 0.1);
}
hr:nth-child(17)::before {
  content: "17";
}
hr:nth-child(17)::after {
  content: "17";
}

hr:nth-child(18) {
  animation-delay: 1.8s;
  border: 1px solid rgba(88, 218, 123, 0.5);
  background: rgba(86, 220, 113, 0.1);
}
hr:nth-child(18)::before {
  content: "18";
}
hr:nth-child(18)::after {
  content: "18";
}

hr:nth-child(19) {
  animation-delay: 1.9s;
  border: 1px solid rgba(51, 95, 255, 0.5);
  background: rgba(85, 221, 121, 0.1);
}
hr:nth-child(19)::before {
  content: "19";
}
hr:nth-child(19)::after {
  content: "19";
}

hr:nth-child(20) {
  animation-delay: 2s;
  border: 1px solid rgba(51, 221, 255, 0.5);
  background: rgba(255, 51, 88, 0.1);
}
hr:nth-child(20)::before {
  content: "20";
}
hr:nth-child(20)::after {
  content: "20";
}

hr:nth-child(21) {
  animation-delay: 2.1s;
  border: 1px solid rgba(51, 248, 255, 0.5);
  background: rgba(51, 163, 255, 0.1);
}
hr:nth-child(21)::before {
  content: "21";
}
hr:nth-child(21)::after {
  content: "21";
}

hr:nth-child(22) {
  animation-delay: 2.2s;
  border: 1px solid rgba(71, 255, 51, 0.5);
  background: rgba(53, 243, 253, 0.1);
}
hr:nth-child(22)::before {
  content: "22";
}
hr:nth-child(22)::after {
  content: "22";
}

hr:nth-child(23) {
  animation-delay: 2.3s;
  border: 1px solid rgba(64, 242, 191, 0.5);
  background: rgba(239, 67, 239, 0.1);
}
hr:nth-child(23)::before {
  content: "23";
}
hr:nth-child(23)::after {
  content: "23";
}

hr:nth-child(24) {
  animation-delay: 2.4s;
  border: 1px solid rgba(235, 51, 255, 0.5);
  background: rgba(251, 55, 166, 0.1);
}
hr:nth-child(24)::before {
  content: "24";
}
hr:nth-child(24)::after {
  content: "24";
}

hr:nth-child(25) {
  animation-delay: 2.5s;
  border: 1px solid rgba(63, 246, 60, 0.5);
  background: rgba(51, 153, 255, 0.1);
}
hr:nth-child(25)::before {
  content: "25";
}
hr:nth-child(25)::after {
  content: "25";
}

hr:nth-child(26) {
  animation-delay: 2.6s;
  border: 1px solid rgba(51, 88, 255, 0.5);
  background: rgba(69, 78, 237, 0.1);
}
hr:nth-child(26)::before {
  content: "26";
}
hr:nth-child(26)::after {
  content: "26";
}

hr:nth-child(27) {
  animation-delay: 2.7s;
  border: 1px solid rgba(223, 83, 120, 0.5);
  background: rgba(51, 211, 255, 0.1);
}
hr:nth-child(27)::before {
  content: "27";
}
hr:nth-child(27)::after {
  content: "27";
}

hr:nth-child(28) {
  animation-delay: 2.8s;
  border: 1px solid rgba(51, 235, 255, 0.5);
  background: rgba(150, 51, 255, 0.1);
}
hr:nth-child(28)::before {
  content: "28";
}
hr:nth-child(28)::after {
  content: "28";
}

hr:nth-child(29) {
  animation-delay: 2.9s;
  border: 1px solid rgba(51, 255, 71, 0.5);
  background: rgba(51, 167, 255, 0.1);
}
hr:nth-child(29)::before {
  content: "29";
}
hr:nth-child(29)::after {
  content: "29";
}

hr:nth-child(30) {
  animation-delay: 3s;
  border: 1px solid rgba(123, 72, 234, 0.5);
  background: rgba(235, 51, 255, 0.1);
}
hr:nth-child(30)::before {
  content: "30";
}
hr:nth-child(30)::after {
  content: "30";
}

hr:nth-child(31) {
  animation-delay: 3.1s;
  border: 1px solid rgba(255, 51, 245, 0.5);
  background: rgba(84, 222, 111, 0.1);
}
hr:nth-child(31)::before {
  content: "31";
}
hr:nth-child(31)::after {
  content: "31";
}

hr:nth-child(32) {
  animation-delay: 3.2s;
  border: 1px solid rgba(62, 244, 135, 0.5);
  background: rgba(129, 51, 255, 0.1);
}
hr:nth-child(32)::before {
  content: "32";
}
hr:nth-child(32)::after {
  content: "32";
}

hr:nth-child(33) {
  animation-delay: 3.3s;
  border: 1px solid rgba(65, 109, 241, 0.5);
  background: rgba(51, 61, 255, 0.1);
}
hr:nth-child(33)::before {
  content: "33";
}
hr:nth-child(33)::after {
  content: "33";
}

hr:nth-child(34) {
  animation-delay: 3.4s;
  border: 1px solid rgba(104, 219, 87, 0.5);
  background: rgba(255, 51, 190, 0.1);
}
hr:nth-child(34)::before {
  content: "34";
}
hr:nth-child(34)::after {
  content: "34";
}

hr:nth-child(35) {
  animation-delay: 3.5s;
  border: 1px solid rgba(51, 160, 255, 0.5);
  background: rgba(167, 51, 255, 0.1);
}
hr:nth-child(35)::before {
  content: "35";
}
hr:nth-child(35)::after {
  content: "35";
}

hr:nth-child(36) {
  animation-delay: 3.6s;
  border: 1px solid rgba(238, 68, 176, 0.5);
  background: rgba(251, 55, 88, 0.1);
}
hr:nth-child(36)::before {
  content: "36";
}
hr:nth-child(36)::after {
  content: "36";
}

hr:nth-child(37) {
  animation-delay: 3.7s;
  border: 1px solid rgba(73, 164, 233, 0.5);
  background: rgba(51, 211, 255, 0.1);
}
hr:nth-child(37)::before {
  content: "37";
}
hr:nth-child(37)::after {
  content: "37";
}

hr:nth-child(38) {
  animation-delay: 3.8s;
  border: 1px solid rgba(102, 244, 62, 0.5);
  background: rgba(51, 255, 133, 0.1);
}
hr:nth-child(38)::before {
  content: "38";
}
hr:nth-child(38)::after {
  content: "38";
}

hr:nth-child(39) {
  animation-delay: 3.9s;
  border: 1px solid rgba(77, 184, 230, 0.5);
  background: rgba(112, 255, 51, 0.1);
}
hr:nth-child(39)::before {
  content: "39";
}
hr:nth-child(39)::after {
  content: "39";
}

hr:nth-child(40) {
  animation-delay: 4s;
  border: 1px solid rgba(77, 230, 128, 0.5);
  background: rgba(84, 123, 222, 0.1);
}
hr:nth-child(40)::before {
  content: "40";
}
hr:nth-child(40)::after {
  content: "40";
}

hr:nth-child(41) {
  animation-delay: 4.1s;
  border: 1px solid rgba(85, 174, 221, 0.5);
  background: rgba(51, 255, 65, 0.1);
}
hr:nth-child(41)::before {
  content: "41";
}
hr:nth-child(41)::after {
  content: "41";
}

hr:nth-child(42) {
  animation-delay: 4.2s;
  border: 1px solid rgba(169, 56, 250, 0.5);
  background: rgba(54, 252, 219, 0.1);
}
hr:nth-child(42)::before {
  content: "42";
}
hr:nth-child(42)::after {
  content: "42";
}

hr:nth-child(43) {
  animation-delay: 4.3s;
  border: 1px solid rgba(51, 255, 58, 0.5);
  background: rgba(255, 51, 95, 0.1);
}
hr:nth-child(43)::before {
  content: "43";
}
hr:nth-child(43)::after {
  content: "43";
}

hr:nth-child(44) {
  animation-delay: 4.4s;
  border: 1px solid rgba(51, 129, 255, 0.5);
  background: rgba(177, 51, 255, 0.1);
}
hr:nth-child(44)::before {
  content: "44";
}
hr:nth-child(44)::after {
  content: "44";
}

hr:nth-child(45) {
  animation-delay: 4.5s;
  border: 1px solid rgba(100, 228, 78, 0.5);
  background: rgba(227, 79, 133, 0.1);
}
hr:nth-child(45)::before {
  content: "45";
}
hr:nth-child(45)::after {
  content: "45";
}

hr:nth-child(46) {
  animation-delay: 4.6s;
  border: 1px solid rgba(51, 255, 211, 0.5);
  background: rgba(60, 110, 246, 0.1);
}
hr:nth-child(46)::before {
  content: "46";
}
hr:nth-child(46)::after {
  content: "46";
}

hr:nth-child(47) {
  animation-delay: 4.7s;
  border: 1px solid rgba(79, 173, 227, 0.5);
  background: rgba(51, 255, 150, 0.1);
}
hr:nth-child(47)::before {
  content: "47";
}
hr:nth-child(47)::after {
  content: "47";
}

hr:nth-child(48) {
  animation-delay: 4.8s;
  border: 1px solid rgba(54, 255, 51, 0.5);
  background: rgba(51, 71, 255, 0.1);
}
hr:nth-child(48)::before {
  content: "48";
}
hr:nth-child(48)::after {
  content: "48";
}

hr:nth-child(49) {
  animation-delay: 4.9s;
  border: 1px solid rgba(82, 255, 51, 0.5);
  background: rgba(255, 51, 99, 0.1);
}
hr:nth-child(49)::before {
  content: "49";
}
hr:nth-child(49)::after {
  content: "49";
}

hr:nth-child(50) {
  animation-delay: 5s;
  border: 1px solid rgba(255, 51, 78, 0.5);
  background: rgba(255, 51, 207, 0.1);
}
hr:nth-child(50)::before {
  content: "50";
}
hr:nth-child(50)::after {
  content: "50";
}

hr:nth-child(51) {
  animation-delay: 5.1s;
  border: 1px solid rgba(105, 56, 250, 0.5);
  background: rgba(65, 51, 255, 0.1);
}
hr:nth-child(51)::before {
  content: "51";
}
hr:nth-child(51)::after {
  content: "51";
}

hr:nth-child(52) {
  animation-delay: 5.2s;
  border: 1px solid rgba(219, 87, 122, 0.5);
  background: rgba(255, 51, 218, 0.1);
}
hr:nth-child(52)::before {
  content: "52";
}
hr:nth-child(52)::after {
  content: "52";
}

hr:nth-child(53) {
  animation-delay: 5.3s;
  border: 1px solid rgba(190, 51, 255, 0.5);
  background: rgba(51, 78, 255, 0.1);
}
hr:nth-child(53)::before {
  content: "53";
}
hr:nth-child(53)::after {
  content: "53";
}

hr:nth-child(54) {
  animation-delay: 5.4s;
  border: 1px solid rgba(51, 160, 255, 0.5);
  background: rgba(51, 255, 58,.........完整代码请登录后点击上方下载按钮下载查看

网友评论0