div+css实现三维蜜蜂飞舞动画效果代码
代码语言:html
所属分类:三维
代码描述:div+css实现三维蜜蜂飞舞动画效果代码,无js代码,采用css实现蜜蜂展翅动画效果。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { display: grid; place-items: center; min-height: 100vh; background-image: radial-gradient(#305f9c, #12243b); overflow: hidden; perspective: 1000px; } body .scene, body .scene * { transform-style: preserve-3d; } body .scene { position: relative; width: 70vmin; height: 70vmin; margin-top: -45%; transform: rotateX(-30deg) rotateY(-10deg) scale3d(1, 1, 1); animation: rot 20s ease-in-out 0s infinite alternate; } @keyframes rot { to { transform: rotateX(0deg) rotateY(440deg) scale3d(1, 1, 1); } } body .scene::after { content: ""; position: absolute; width: 100%; height: 100%; left: 0; top: 0; z-index: -100; transform: rotateX(90deg) translateZ(calc(70vmin / -2)) scale(1); } body .scene .cube, body .scene .cube * { position: absolute; bottom: 0; } body .scene #ground { z-index: -50; width: 70vmin; height: 3vmin; } body .scene #ground .container { position: relative; width: 100%; height: 100%; } body .scene #ground .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene #ground .container .left { width: 70vmin; height: 3vmin; background-color: #92C54E; transform-origin: left top; transform: rotateY(-90deg) translateX(-35vmin); } body .scene #ground .container .right { width: 70vmin; height: 3vmin; background-color: #92C54E; transform-origin: left top; transform: rotateY(90deg) translateX(-35vmin) translateZ(70vmin); } body .scene #ground .container .top { background-color: #9ecb61; width: 70vmin; height: 70vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(35vmin) translateZ(3vmin); } body .scene #ground .container .bottom { background-color: #9ecb61; width: 70vmin; height: 70vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(35vmin); } body .scene #ground .container .front { background-color: #7eb03a; width: 70vmin; height: 3vmin; transform-origin: bottom left; transform: translateZ(35vmin); } body .scene #ground .container .back { background-color: #7eb03a; width: 70vmin; height: 3vmin; transform-origin: center; transform: rotateY(180deg) translateZ(35vmin); } body .scene #ground .container .left, body .scene #ground .container .right, body .scene #ground .container .front, body .scene #ground .container .back { background-image: linear-gradient(180deg, #0000 0% 20%, #6C883E 20% 45%, #BC7D3D 45% 100%); } body .scene #ground .container .bottom { background-color: #E1B366; filter: drop-shadow(0 0 3.75rem black); } body .scene #ground .container .top { box-shadow: inset 0 0 15vmin #000a; background-image: radial-gradient(#0008, #0000 10em), repeating-linear-gradient(90deg, #0000 0% 50%, #0001 50% 100%); background-size: 100%, 4em 4em, 4em 4em; } @keyframes moveGround { to { background-position-x: center, 4em, 4em; } } body .scene .flowers { position: absolute; width: 100%; height: 100%; bottom: 0; transform: translate3d(0, -3.02vmin, 0); } body .scene .flowers div { position: absolute; width: 100%; height: 100%; bottom: 0; } body .scene .flowers #flower-1 { transform: translate3d(14vmin, 0vmin, -25vmin); } body .scene .flowers #flower-1 div:nth-child(1) { width: 8vmin; height: 1vmin; transform: translate3d(0, 0, 0); } body .scene .flowers #flower-1 div:nth-child(1) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-1 div:nth-child(1) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-1 div:nth-child(1) .container .left { width: 8vmin; height: 1vmin; background-color: #BC7D3D; transform-origin: left top; transform: rotateY(-90deg) translateX(-4vmin); } body .scene .flowers #flower-1 div:nth-child(1) .container .right { width: 8vmin; height: 1vmin; background-color: #BC7D3D; transform-origin: left top; transform: rotateY(90deg) translateX(-4vmin) translateZ(8vmin); } body .scene .flowers #flower-1 div:nth-child(1) .container .top { background-color: #c58a4d; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(4vmin) translateZ(1vmin); } body .scene .flowers #flower-1 div:nth-child(1) .container .bottom { background-color: #c58a4d; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(4vmin); } body .scene .flowers #flower-1 div:nth-child(1) .container .front { background-color: #9d6933; width: 8vmin; height: 1vmin; transform-origin: bottom left; transform: translateZ(4vmin); } body .scene .flowers #flower-1 div:nth-child(1) .container .back { background-color: #9d6933; width: 8vmin; height: 1vmin; transform-origin: center; transform: rotateY(180deg) translateZ(4vmin); } body .scene .flowers #flower-1 div:nth-child(1) .container .bottom { box-shadow: 0 0 5vmin #000; } body .scene .flowers #flower-1 div:nth-child(2) { width: 2vmin; height: 7vmin; transform: translate3d(3vmin, -1vmin, 0); } body .scene .flowers #flower-1 div:nth-child(2) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-1 div:nth-child(2) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-1 div:nth-child(2) .container .left { width: 2vmin; height: 7vmin; background-color: #4CB648; transform-origin: left top; transform: rotateY(-90deg) translateX(-1vmin); } body .scene .flowers #flower-1 div:nth-child(2) .container .right { width: 2vmin; height: 7vmin; background-color: #4CB648; transform-origin: left top; transform: rotateY(90deg) translateX(-1vmin) translateZ(2vmin); } body .scene .flowers #flower-1 div:nth-child(2) .container .top { background-color: #5dbe5a; width: 2vmin; height: 2vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1vmin) translateZ(7vmin); } body .scene .flowers #flower-1 div:nth-child(2) .container .bottom { background-color: #5dbe5a; width: 2vmin; height: 2vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1vmin); } body .scene .flowers #flower-1 div:nth-child(2) .container .front { background-color: #40993c; width: 2vmin; height: 7vmin; transform-origin: bottom left; transform: translateZ(1vmin); } body .scene .flowers #flower-1 div:nth-child(2) .container .back { background-color: #40993c; width: 2vmin; height: 7vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1vmin); } body .scene .flowers #flower-1 div:nth-child(3) { width: 8vmin; height: 1.5vmin; transform: translate3d(0vmin, -8vmin, 0); } body .scene .flowers #flower-1 div:nth-child(3) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-1 div:nth-child(3) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-1 div:nth-child(3) .container .left { width: 8vmin; height: 1.5vmin; background-color: #F15D5C; transform-origin: left top; transform: rotateY(-90deg) translateX(-4vmin); } body .scene .flowers #flower-1 div:nth-child(3) .container .right { width: 8vmin; height: 1.5vmin; background-color: #F15D5C; transform-origin: left top; transform: rotateY(90deg) translateX(-4vmin) translateZ(8vmin); } body .scene .flowers #flower-1 div:nth-child(3) .container .top { background-color: #f37473; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(4vmin) translateZ(1.5vmin); } body .scene .flowers #flower-1 div:nth-child(3) .container .bottom { background-color: #f37473; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(4vmin); } body .scene .flowers #flower-1 div:nth-child(3) .container .front { background-color: #ee3836; width: 8vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(4vmin); } body .scene .flowers #flower-1 div:nth-child(3) .container .back { background-color: #ee3836; width: 8vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(4vmin); } body .scene .flowers #flower-1 div:nth-child(4) { width: 10vmin; height: 1.5vmin; transform: translate3d(-1vmin, -8vmin, 0); } body .scene .flowers #flower-1 div:nth-child(4) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-1 div:nth-child(4) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-1 div:nth-child(4) .container .left { width: 3vmin; height: 1.5vmin; background-color: #F15D5C; transform-origin: left top; transform: rotateY(-90deg) translateX(-1.5vmin); } body .scene .flowers #flower-1 div:nth-child(4) .container .right { width: 3vmin; height: 1.5vmin; background-color: #F15D5C; transform-origin: left top; transform: rotateY(90deg) translateX(-1.5vmin) translateZ(10vmin); } body .scene .flowers #flower-1 div:nth-child(4) .container .top { background-color: #f37473; width: 10vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1.5vmin) translateZ(1.5vmin); } body .scene .flowers #flower-1 div:nth-child(4) .container .bottom { background-color: #f37473; width: 10vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1.5vmin); } body .scene .flowers #flower-1 div:nth-child(4) .container .front { background-color: #ee3836; width: 10vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(1.5vmin); } body .scene .flowers #flower-1 div:nth-child(4) .container .back { background-color: #ee3836; width: 10vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1.5vmin); } body .scene .flowers #flower-1 div:nth-child(5) { width: 3vmin; height: 1.5vmin; transform: translate3d(2.5vmin, -8vmin, 0); } body .scene .flowers #flower-1 div:nth-child(5) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-1 div:nth-child(5) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-1 div:nth-child(5) .container .left { width: 10vmin; height: 1.5vmin; background-color: #F15D5C; transform-origin: left top; transform: rotateY(-90deg) translateX(-5vmin); } body .scene .flowers #flower-1 div:nth-child(5) .container .right { width: 10vmin; height: 1.5vmin; background-color: #F15D5C; transform-origin: left top; transform: rotateY(90deg) translateX(-5vmin) translateZ(3vmin); } body .scene .flowers #flower-1 div:nth-child(5) .container .top { background-color: #f37473; width: 3vmin; height: 10vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(5vmin) translateZ(1.5vmin); } body .scene .flowers #flower-1 div:nth-child(5) .container .bottom { background-color: #f37473; width: 3vmin; height: 10vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(5vmin); } body .scene .flowers #flower-1 div:nth-child(5) .container .front { background-color: #ee3836; width: 3vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(5vmin); } body .scene .flowers #flower-1 div:nth-child(5) .container .back { background-color: #ee3836; width: 3vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(5vmin); } body .scene .flowers #flower-1 div:nth-child(6) { width: 3vmin; height: 1vmin; transform: translate3d(2.5vmin, -9vmin, 0); } body .scene .flowers #flower-1 div:nth-child(6) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-1 div:nth-child(6) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-1 div:nth-child(6) .container .left { width: 3vmin; height: 1vmin; background-color: #ECD015; transform-origin: left top; transform: rotateY(-90deg) translateX(-1.5vmin); } body .scene .flowers #flower-1 div:nth-child(6) .container .right { width: 3vmin; height: 1vmin; background-color: #ECD015; transform-origin: left top; transform: rotateY(90deg) translateX(-1.5vmin) translateZ(3vmin); } body .scene .flowers #flower-1 div:nth-child(6) .container .top { background-color: #eed52d; width: 3vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1.5vmin) translateZ(1vmin); } body .scene .flowers #flower-1 div:nth-child(6) .container .bottom { background-color: #eed52d; width: 3vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1.5vmin); } body .scene .flowers #flower-1 div:nth-child(6) .container .front { background-color: #c8b010; width: 3vmin; height: 1vmin; transform-origin: bottom left; transform: translateZ(1.5vmin); } body .scene .flowers #flower-1 div:nth-child(6) .container .back { background-color: #c8b010; width: 3vmin; height: 1vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1.5vmin); } body .scene .flowers #flower-2 { transform: translate3d(7vmin, 0vmin, 20vmin); } body .scene .flowers #flower-2 div:nth-child(1) { width: 8vmin; height: 1vmin; transform: translate3d(0, 0, 0); } body .scene .flowers #flower-2 div:nth-child(1) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-2 div:nth-child(1) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-2 div:nth-child(1) .container .left { width: 8vmin; height: 1vmin; background-color: #BC7D3D; transform-origin: left top; transform: rotateY(-90deg) translateX(-4vmin); } body .scene .flowers #flower-2 div:nth-child(1) .container .right { width: 8vmin; height: 1vmin; background-color: #BC7D3D; transform-origin: left top; transform: rotateY(90deg) translateX(-4vmin) translateZ(8vmin); } body .scene .flowers #flower-2 div:nth-child(1) .container .top { background-color: #c58a4d; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(4vmin) translateZ(1vmin); } body .scene .flowers #flower-2 div:nth-child(1) .container .bottom { background-color: #c58a4d; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(4vmin); } body .scene .flowers #flower-2 div:nth-child(1) .container .front { background-color: #9d6933; width: 8vmin; height: 1vmin; transform-origin: bottom left; transform: translateZ(4vmin); } body .scene .flowers #flower-2 div:nth-child(1) .container .back { background-color: #9d6933; width: 8vmin; height: 1vmin; transform-origin: center; transform: rotateY(180deg) translateZ(4vmin); } body .scene .flowers #flower-2 div:nth-child(1) .container .bottom { box-shadow: 0 0 5vmin #000; } body .scene .flowers #flower-2 div:nth-child(2) { width: 2vmin; height: 7vmin; transform: translate3d(3vmin, -1vmin, 0); } body .scene .flowers #flower-2 div:nth-child(2) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-2 div:nth-child(2) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-2 div:nth-child(2) .container .left { width: 2vmin; height: 7vmin; background-color: #4CB648; transform-origin: left top; transform: rotateY(-90deg) translateX(-1vmin); } body .scene .flowers #flower-2 div:nth-child(2) .container .right { width: 2vmin; height: 7vmin; background-color: #4CB648; transform-origin: left top; transform: rotateY(90deg) translateX(-1vmin) translateZ(2vmin); } body .scene .flowers #flower-2 div:nth-child(2) .container .top { background-color: #5dbe5a; width: 2vmin; height: 2vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1vmin) translateZ(7vmin); } body .scene .flowers #flower-2 div:nth-child(2) .container .bottom { background-color: #5dbe5a; width: 2vmin; height: 2vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1vmin); } body .scene .flowers #flower-2 div:nth-child(2) .container .front { background-color: #40993c; width: 2vmin; height: 7vmin; transform-origin: bottom left; transform: translateZ(1vmin); } body .scene .flowers #flower-2 div:nth-child(2) .container .back { background-color: #40993c; width: 2vmin; height: 7vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1vmin); } body .scene .flowers #flower-2 div:nth-child(3) { width: 8vmin; height: 1.5vmin; transform: translate3d(0vmin, -8vmin, 0); } body .scene .flowers #flower-2 div:nth-child(3) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-2 div:nth-child(3) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-2 div:nth-child(3) .container .left { width: 8vmin; height: 1.5vmin; background-color: #F47A2D; transform-origin: left top; transform: rotateY(-90deg) translateX(-4vmin); } body .scene .flowers #flower-2 div:nth-child(3) .container .right { width: 8vmin; height: 1.5vmin; background-color: #F47A2D; transform-origin: left top; transform: rotateY(90deg) translateX(-4vmin) translateZ(8vmin); } body .scene .flowers #flower-2 div:nth-child(3) .container .top { background-color: #f58945; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(4vmin) translateZ(1.5vmin); } body .scene .flowers #flower-2 div:nth-child(3) .container .bottom { background-color: #f58945; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(4vmin); } body .scene .flowers #flower-2 div:nth-child(3) .container .front { background-color: #ec630c; width: 8vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(4vmin); } body .scene .flowers #flower-2 div:nth-child(3) .container .back { background-color: #ec630c; width: 8vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(4vmin); } body .scene .flowers #flower-2 div:nth-child(4) { width: 10vmin; height: 1.5vmin; transform: translate3d(-1vmin, -8vmin, 0); } body .scene .flowers #flower-2 div:nth-child(4) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-2 div:nth-child(4) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-2 div:nth-child(4) .container .left { width: 3vmin; height: 1.5vmin; background-color: #F47A2D; transform-origin: left top; transform: rotateY(-90deg) translateX(-1.5vmin); } body .scene .flowers #flower-2 div:nth-child(4) .container .right { width: 3vmin; height: 1.5vmin; background-color: #F47A2D; transform-origin: left top; transform: rotateY(90deg) translateX(-1.5vmin) translateZ(10vmin); } body .scene .flowers #flower-2 div:nth-child(4) .container .top { background-color: #f58945; width: 10vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1.5vmin) translateZ(1.5vmin); } body .scene .flowers #flower-2 div:nth-child(4) .container .bottom { background-color: #f58945; width: 10vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1.5vmin); } body .scene .flowers #flower-2 div:nth-child(4) .container .front { background-color: #ec630c; width: 10vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(1.5vmin); } body .scene .flowers #flower-2 div:nth-child(4) .container .back { background-color: #ec630c; width: 10vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1.5vmin); } body .scene .flowers #flower-2 div:nth-child(5) { width: 3vmin; height: 1.5vmin; transform: translate3d(2.5vmin, -8vmin, 0); } body .scene .flowers #flower-2 div:nth-child(5) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-2 div:nth-child(5) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-2 div:nth-child(5) .container .left { width: 10vmin; height: 1.5vmin; background-color: #F47A2D; transform-origin: left top; transform: rotateY(-90deg) translateX(-5vmin); } body .scene .flowers #flower-2 div:nth-child(5) .container .right { width: 10vmin; height: 1.5vmin; background-color: #F47A2D; transform-origin: left top; transform: rotateY(90deg) translateX(-5vmin) translateZ(3vmin); } body .scene .flowers #flower-2 div:nth-child(5) .container .top { background-color: #f58945; width: 3vmin; height: 10vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(5vmin) translateZ(1.5vmin); } body .scene .flowers #flower-2 div:nth-child(5) .container .bottom { background-color: #f58945; width: 3vmin; height: 10vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(5vmin); } body .scene .flowers #flower-2 div:nth-child(5) .container .front { background-color: #ec630c; width: 3vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(5vmin); } body .scene .flowers #flower-2 div:nth-child(5) .container .back { background-color: #ec630c; width: 3vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(5vmin); } body .scene .flowers #flower-2 div:nth-child(6) { width: 3vmin; height: 1vmin; transform: translate3d(2.5vmin, -9vmin, 0); } body .scene .flowers #flower-2 div:nth-child(6) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-2 div:nth-child(6) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-2 div:nth-child(6) .container .left { width: 3vmin; height: 1vmin; background-color: #0D6B37; transform-origin: left top; transform: rotateY(-90deg) translateX(-1.5vmin); } body .scene .flowers #flower-2 div:nth-child(6) .container .right { width: 3vmin; height: 1vmin; background-color: #0D6B37; transform-origin: left top; transform: rotateY(90deg) translateX(-1.5vmin) translateZ(3vmin); } body .scene .flowers #flower-2 div:nth-child(6) .container .top { background-color: #108243; width: 3vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1.5vmin) translateZ(1vmin); } body .scene .flowers #flower-2 div:nth-child(6) .container .bottom { background-color: #108243; width: 3vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1.5vmin); } body .scene .flowers #flower-2 div:nth-child(6) .container .front { background-color: #094724; width: 3vmin; height: 1vmin; transform-origin: bottom left; transform: translateZ(1.5vmin); } body .scene .flowers #flower-2 div:nth-child(6) .container .back { background-color: #094724; width: 3vmin; height: 1vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1.5vmin); } body .scene .flowers #flower-3 { transform: translate3d(53vmin, 0vmin, -20vmin); } body .scene .flowers #flower-3 div:nth-child(1) { width: 8vmin; height: 1vmin; transform: translate3d(0, 0, 0); } body .scene .flowers #flower-3 div:nth-child(1) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-3 div:nth-child(1) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-3 div:nth-child(1) .container .left { width: 8vmin; height: 1vmin; background-color: #BC7D3D; transform-origin: left top; transform: rotateY(-90deg) translateX(-4vmin); } body .scene .flowers #flower-3 div:nth-child(1) .container .right { width: 8vmin; height: 1vmin; background-color: #BC7D3D; transform-origin: left top; transform: rotateY(90deg) translateX(-4vmin) translateZ(8vmin); } body .scene .flowers #flower-3 div:nth-child(1) .container .top { background-color: #c58a4d; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(4vmin) translateZ(1vmin); } body .scene .flowers #flower-3 div:nth-child(1) .container .bottom { background-color: #c58a4d; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(4vmin); } body .scene .flowers #flower-3 div:nth-child(1) .container .front { background-color: #9d6933; width: 8vmin; height: 1vmin; transform-origin: bottom left; transform: translateZ(4vmin); } body .scene .flowers #flower-3 div:nth-child(1) .container .back { background-color: #9d6933; width: 8vmin; height: 1vmin; transform-origin: center; transform: rotateY(180deg) translateZ(4vmin); } body .scene .flowers #flower-3 div:nth-child(1) .container .bottom { box-shadow: 0 0 5vmin #000; } body .scene .flowers #flower-3 div:nth-child(2) { width: 2vmin; height: 7vmin; transform: translate3d(3vmin, -1vmin, 0); } body .scene .flowers #flower-3 div:nth-child(2) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-3 div:nth-child(2) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-3 div:nth-child(2) .container .left { width: 2vmin; height: 7vmin; background-color: #4CB648; transform-origin: left top; transform: rotateY(-90deg) translateX(-1vmin); } body .scene .flowers #flower-3 div:nth-child(2) .container .right { width: 2vmin; height: 7vmin; background-color: #4CB648; transform-origin: left top; transform: rotateY(90deg) translateX(-1vmin) translateZ(2vmin); } body .scene .flowers #flower-3 div:nth-child(2) .container .top { background-color: #5dbe5a; width: 2vmin; height: 2vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1vmin) translateZ(7vmin); } body .scene .flowers #flower-3 div:nth-child(2) .container .bottom { background-color: #5dbe5a; width: 2vmin; height: 2vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1vmin); } body .scene .flowers #flower-3 div:nth-child(2) .container .front { background-color: #40993c; width: 2vmin; height: 7vmin; transform-origin: bottom left; transform: translateZ(1vmin); } body .scene .flowers #flower-3 div:nth-child(2) .container .back { background-color: #40993c; width: 2vmin; height: 7vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1vmin); } body .scene .flowers #flower-3 div:nth-child(3) { width: 8vmin; height: 1.5vmin; transform: translate3d(0vmin, -8vmin, 0); } body .scene .flowers #flower-3 div:nth-child(3) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-3 div:nth-child(3) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-3 div:nth-child(3) .container .left { width: 8vmin; height: 1.5vmin; background-color: #81ACD8; transform-origin: left top; transform: rotateY(-90deg) translateX(-4vmin); } body .scene .flowers #flower-3 div:nth-child(3) .container .right { width: 8vmin; height: 1.5vmin; background-color: #81ACD8; transform-origin: left top; transform: rotateY(90deg) translateX(-4vmin) translateZ(8vmin); } body .scene .flowers #flower-3 div:nth-child(3) .container .top { background-color: #94b9de; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(4vmin) translateZ(1.5vmin); } body .scene .flowers #flower-3 div:nth-child(3) .container .bottom { background-color: #94b9de; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(4vmin); } body .scene .flowers #flower-3 div:nth-child(3) .container .front { background-color: #6297ce; width: 8vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(4vmin); } body .scene .flowers #flower-3 div:nth-child(3) .container .back { background-color: #6297ce; width: 8vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(4vmin); } body .scene .flowers #flower-3 div:nth-child(4) { width: 10vmin; height: 1.5vmin; transform: translate3d(-1vmin, -8vmin, 0); } body .scene .flowers #flower-3 div:nth-child(4) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-3 div:nth-child(4) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-3 div:nth-child(4) .container .left { width: 3vmin; height: 1.5vmin; background-color: #81ACD8; transform-origin: left top; transform: rotateY(-90deg) translateX(-1.5vmin); } body .scene .flowers #flower-3 div:nth-child(4) .container .right { width: 3vmin; height: 1.5vmin; background-color: #81ACD8; transform-origin: left top; transform: rotateY(90deg) translateX(-1.5vmin) translateZ(10vmin); } body .scene .flowers #flower-3 div:nth-child(4) .container .top { background-color: #94b9de; width: 10vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1.5vmin) translateZ(1.5vmin); } body .scene .flowers #flower-3 div:nth-child(4) .container .bottom { background-color: #94b9de; width: 10vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1.5vmin); } body .scene .flowers #flower-3 div:nth-child(4) .container .front { background-color: #6297ce; width: 10vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(1.5vmin); } body .scene .flowers #flower-3 div:nth-child(4) .container .back { background-color: #6297ce; width: 10vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1.5vmin); } body .scene .flowers #flower-3 div:nth-child(5) { width: 3vmin; height: 1.5vmin; transform: translate3d(2.5vmin, -8vmin, 0); } body .scene .flowers #flower-3 div:nth-child(5) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-3 div:nth-child(5) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-3 div:nth-child(5) .container .left { width: 10vmin; height: 1.5vmin; background-color: #81ACD8; transform-origin: left top; transform: rotateY(-90deg) translateX(-5vmin); } body .scene .flowers #flower-3 div:nth-child(5) .container .right { width: 10vmin; height: 1.5vmin; background-color: #81ACD8; transform-origin: left top; transform: rotateY(90deg) translateX(-5vmin) translateZ(3vmin); } body .scene .flowers #flower-3 div:nth-child(5) .container .top { background-color: #94b9de; width: 3vmin; height: 10vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(5vmin) translateZ(1.5vmin); } body .scene .flowers #flower-3 div:nth-child(5) .container .bottom { background-color: #94b9de; width: 3vmin; height: 10vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(5vmin); } body .scene .flowers #flower-3 div:nth-child(5) .container .front { background-color: #6297ce; width: 3vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(5vmin); } body .scene .flowers #flower-3 div:nth-child(5) .container .back { background-color: #6297ce; width: 3vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(5vmin); } body .scene .flowers #flower-3 div:nth-child(6) { width: 3vmin; height: 1vmin; transform: translate3d(2.5vmin, -9vmin, 0); } body .scene .flowers #flower-3 div:nth-child(6) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-3 div:nth-child(6) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-3 div:nth-child(6) .container .left { width: 3vmin; height: 1vmin; background-color: #EC3536; transform-origin: left top; transform: rotateY(-90deg) translateX(-1.5vmin); } body .scene .flowers #flower-3 div:nth-child(6) .container .right { width: 3vmin; height: 1vmin; background-color: #EC3536; transform-origin: left top; transform: rotateY(90deg) translateX(-1.5vmin) translateZ(3vmin); } body .scene .flowers #flower-3 div:nth-child(6) .container .top { background-color: #ee4c4d; width: 3vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1.5vmin) translateZ(1vmin); } body .scene .flowers #flower-3 div:nth-child(6) .container .bottom { background-color: #ee4c4d; width: 3vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1.5vmin); } body .scene .flowers #flower-3 div:nth-child(6) .container .front { background-color: #e31516; width: 3vmin; height: 1vmin; transform-origin: bottom left; transform: translateZ(1.5vmin); } body .scene .flowers #flower-3 div:nth-child(6) .container .back { background-color: #e31516; width: 3vmin; height: 1vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1.5vmin); } body .scene .flowers #flower-4 { transform: translate3d(45vmin, 0vmin, 25vmin); } body .scene .flowers #flower-4 div:nth-child(1) { width: 8vmin; height: 1vmin; transform: translate3d(0, 0, 0); } body .scene .flowers #flower-4 div:nth-child(1) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-4 div:nth-child(1) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-4 div:nth-child(1) .container .left { width: 8vmin; height: 1vmin; background-color: #BC7D3D; transform-origin: left top; transform: rotateY(-90deg) translateX(-4vmin); } body .scene .flowers #flower-4 div:nth-child(1) .container .right { width: 8vmin; height: 1vmin; background-color: #BC7D3D; transform-origin: left top; transform: rotateY(90deg) translateX(-4vmin) translateZ(8vmin); } body .scene .flowers #flower-4 div:nth-child(1) .container .top { background-color: #c58a4d; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(4vmin) translateZ(1vmin); } body .scene .flowers #flower-4 div:nth-child(1) .container .bottom { background-color: #c58a4d; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(4vmin); } body .scene .flowers #flower-4 div:nth-child(1) .container .front { background-color: #9d6933; width: 8vmin; height: 1vmin; transform-origin: bottom left; transform: translateZ(4vmin); } body .scene .flowers #flower-4 div:nth-child(1) .container .back { background-color: #9d6933; width: 8vmin; height: 1vmin; transform-origin: center; transform: rotateY(180deg) translateZ(4vmin); } body .scene .flowers #flower-4 div:nth-child(1) .container .bottom { box-shadow: 0 0 5vmin #000; } body .scene .flowers #flower-4 div:nth-child(2) { width: 2vmin; height: 7vmin; transform: translate3d(3vmin, -1vmin, 0); } body .scene .flowers #flower-4 div:nth-child(2) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-4 div:nth-child(2) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-4 div:nth-child(2) .container .left { width: 2vmin; height: 7vmin; background-color: #4CB648; transform-origin: left top; transform: rotateY(-90deg) translateX(-1vmin); } body .scene .flowers #flower-4 div:nth-child(2) .container .right { width: 2vmin; height: 7vmin; background-color: #4CB648; transform-origin: left top; transform: rotateY(90deg) translateX(-1vmin) translateZ(2vmin); } body .scene .flowers #flower-4 div:nth-child(2) .container .top { background-color: #5dbe5a; width: 2vmin; height: 2vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1vmin) translateZ(7vmin); } body .scene .flowers #flower-4 div:nth-child(2) .container .bottom { background-color: #5dbe5a; width: 2vmin; height: 2vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1vmin); } body .scene .flowers #flower-4 div:nth-child(2) .container .front { background-color: #40993c; width: 2vmin; height: 7vmin; transform-origin: bottom left; transform: translateZ(1vmin); } body .scene .flowers #flower-4 div:nth-child(2) .container .back { background-color: #40993c; width: 2vmin; height: 7vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1vmin); } body .scene .flowers #flower-4 div:nth-child(3) { width: 8vmin; height: 1.5vmin; transform: translate3d(0vmin, -8vmin, 0); } body .scene .flowers #flower-4 div:nth-child(3) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-4 div:nth-child(3) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-4 div:nth-child(3) .container .left { width: 8vmin; height: 1.5vmin; background-color: #AE7CB7; transform-origin: left top; transform: rotateY(-90deg) translateX(-4vmin); } body .scene .flowers #flower-4 div:nth-child(3) .container .right { width: 8vmin; height: 1.5vmin; background-color: #AE7CB7; transform-origin: left top; transform: rotateY(90deg) translateX(-4vmin) translateZ(8vmin); } body .scene .flowers #flower-4 div:nth-child(3) .container .top { background-color: #b88cc0; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(4vmin) translateZ(1.5vmin); } body .scene .flowers #flower-4 div:nth-child(3) .container .bottom { background-color: #b88cc0; width: 8vmin; height: 8vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(4vmin); } body .scene .flowers #flower-4 div:nth-child(3) .container .front { background-color: #9e62a9; width: 8vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(4vmin); } body .scene .flowers #flower-4 div:nth-child(3) .container .back { background-color: #9e62a9; width: 8vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(4vmin); } body .scene .flowers #flower-4 div:nth-child(4) { width: 10vmin; height: 1.5vmin; transform: translate3d(-1vmin, -8vmin, 0); } body .scene .flowers #flower-4 div:nth-child(4) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-4 div:nth-child(4) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-4 div:nth-child(4) .container .left { width: 3vmin; height: 1.5vmin; background-color: #AE7CB7; transform-origin: left top; transform: rotateY(-90deg) translateX(-1.5vmin); } body .scene .flowers #flower-4 div:nth-child(4) .container .right { width: 3vmin; height: 1.5vmin; background-color: #AE7CB7; transform-origin: left top; transform: rotateY(90deg) translateX(-1.5vmin) translateZ(10vmin); } body .scene .flowers #flower-4 div:nth-child(4) .container .top { background-color: #b88cc0; width: 10vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1.5vmin) translateZ(1.5vmin); } body .scene .flowers #flower-4 div:nth-child(4) .container .bottom { background-color: #b88cc0; width: 10vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1.5vmin); } body .scene .flowers #flower-4 div:nth-child(4) .container .front { background-color: #9e62a9; width: 10vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(1.5vmin); } body .scene .flowers #flower-4 div:nth-child(4) .container .back { background-color: #9e62a9; width: 10vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1.5vmin); } body .scene .flowers #flower-4 div:nth-child(5) { width: 3vmin; height: 1.5vmin; transform: translate3d(2.5vmin, -8vmin, 0); } body .scene .flowers #flower-4 div:nth-child(5) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-4 div:nth-child(5) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-4 div:nth-child(5) .container .left { width: 10vmin; height: 1.5vmin; background-color: #AE7CB7; transform-origin: left top; transform: rotateY(-90deg) translateX(-5vmin); } body .scene .flowers #flower-4 div:nth-child(5) .container .right { width: 10vmin; height: 1.5vmin; background-color: #AE7CB7; transform-origin: left top; transform: rotateY(90deg) translateX(-5vmin) translateZ(3vmin); } body .scene .flowers #flower-4 div:nth-child(5) .container .top { background-color: #b88cc0; width: 3vmin; height: 10vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(5vmin) translateZ(1.5vmin); } body .scene .flowers #flower-4 div:nth-child(5) .container .bottom { background-color: #b88cc0; width: 3vmin; height: 10vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(5vmin); } body .scene .flowers #flower-4 div:nth-child(5) .container .front { background-color: #9e62a9; width: 3vmin; height: 1.5vmin; transform-origin: bottom left; transform: translateZ(5vmin); } body .scene .flowers #flower-4 div:nth-child(5) .container .back { background-color: #9e62a9; width: 3vmin; height: 1.5vmin; transform-origin: center; transform: rotateY(180deg) translateZ(5vmin); } body .scene .flowers #flower-4 div:nth-child(6) { width: 3vmin; height: 1vmin; transform: translate3d(2.5vmin, -9vmin, 0); } body .scene .flowers #flower-4 div:nth-child(6) .container { position: relative; width: 100%; height: 100%; } body .scene .flowers #flower-4 div:nth-child(6) .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .flowers #flower-4 div:nth-child(6) .container .left { width: 3vmin; height: 1vmin; background-color: #ECD016; transform-origin: left top; transform: rotateY(-90deg) translateX(-1.5vmin); } body .scene .flowers #flower-4 div:nth-child(6) .container .right { width: 3vmin; height: 1vmin; background-color: #ECD016; transform-origin: left top; transform: rotateY(90deg) translateX(-1.5vmin) translateZ(3vmin); } body .scene .flowers #flower-4 div:nth-child(6) .container .top { background-color: #eed52e; width: 3vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(1.5vmin) translateZ(1vmin); } body .scene .flowers #flower-4 div:nth-child(6) .container .bottom { background-color: #eed52e; width: 3vmin; height: 3vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(1.5vmin); } body .scene .flowers #flower-4 div:nth-child(6) .container .front { background-color: #c9b110; width: 3vmin; height: 1vmin; transform-origin: bottom left; transform: translateZ(1.5vmin); } body .scene .flowers #flower-4 div:nth-child(6) .container .back { background-color: #c9b110; width: 3vmin; height: 1vmin; transform-origin: center; transform: rotateY(180deg) translateZ(1.5vmin); } body .scene .bee { position: absolute; width: 100%; height: 100%; bottom: 0; transform-origin: center left; transform: translate3d(25vmin, -10vmin, 0); animation: fly 10s ease-in-out infinite alternate; } @keyframes fly { 33% { transform: translate3d(25vmin, -20vmin, 0vmin) rotate3d(0, 0.2, 0.05, 20deg); } 66% { transform: translate3d(25vmin, -20vmin, 0vmin) rotate3d(0, 0.2, 0.05, -20deg); } 100% { transform: translate3d(25vmin, -20vmin, 0vmin) rotate3d(0, 1, 0, 360deg); } } body .scene .bee .body, body .scene .bee .feet, body .scene .bee .eyes, body .scene .bee .antennas, body .scene .bee .wings, body .scene .bee .pyramid { position: absolute; width: 100%; height: 100%; bottom: 0; } body .scene .bee .body #body-1 { width: 4vmin; height: 12vmin; transform: translate3d(0vmin, -2vmin, 0); } body .scene .bee .body #body-1 .container { position: relative; width: 100%; height: 100%; } body .scene .bee .body #body-1 .container * { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; } body .scene .bee .body #body-1 .container .left { width: 15vmin; height: 12vmin; background-color: #D1A438; transform-origin: left top; transform: rotateY(-90deg) translateX(-7.5vmin); } body .scene .bee .body #body-1 .container .right { width: 15vmin; height: 12vmin; background-color: #D1A438; transform-origin: left top; transform: rotateY(90deg) translateX(-7.5vmin) translateZ(4vmin); } body .scene .bee .body #body-1 .container .top { background-color: #d6ad4d; width: 4vmin; height: 15vmin; transform-origin: bottom left; transform: rotateX(90deg) translateY(7.5vmin) translateZ(12vmin); } body .scene .bee .body #body-1 .container .bottom { background-color: #d6ad4d; width: 4vmin; height: 15vmin; transform-origin: bottom left; transform: rotateX(-90deg) translateY(7.5vmin); } body .scene .bee .body #body-1 .container .front { background-color: #b68d2a; width: 4vmin; height: 12vmin; transform-ori.........完整代码请登录后点击上方下载按钮下载查看
网友评论0