@charset "utf-8"; /* rocket fire */ $sky: linear-gradient(to bottom, #0D3D58, #083250); $rock-det: linear-gradient(to bottom, #959FDA, #EEEFFE); $rock: linear-gradient(to bottom, #D0D6EF, #EEEFFE); $fire-inn: linear-gradient(315deg, rgb(255, 227, 0), #ffe300, rgba(255, 227, 0, 0)); $fire-out: radial-gradient(at 50% 0, rgba(220,122,39, 0.9) 0%, rgba(220,122,39, 0.9) 50%, transparent 70%); $trace: linear-gradient(to bottom, #FCFCFC, #FCD5DC); $steam: radial-gradient(at 30% 0, #c3a490, #FFF); $window: radial-gradient(circle, #815F74, #46437C); $skin: radial-gradient(at 0 30%, #EC9678, #FDCCB0); $lock: #37435D; $mouth: #EA6B7C; $spacesuit: #14CAEF; .box { background-size: 470px; background-position: center; background-repeat: no-repeat; position: relative; margin: auto; display: block; margin-top: 0%; width: 500px; height: 500px; transform: rotate(30deg); } body{ background: $sky; } .rocket-all { position: absolute; left: 30%; top: 0%; height: 90%; width: 40%; animation: rocketShake 3s infinite linear; } .rocket { position: relative; height: 60%; width: 100%; top: -47%; left: 0%; } .rocket-body { position: absolute; width: 80%; height: 80%; top: 0; left: 10%; border-radius: 50% 50% 10% 10%; background-image: $rock; } .rocket-leg { position: absolute; background-image: $rock-det; height: 30%; } .leg-left { left: 0%; bottom: 10%; width: 20%; border-radius: 30px 0 10px 10px; } .leg-right { right: 0%; bottom: 10%; width: 20%; border-radius: 0 30px 10px 10px; } .leg-middle { right: 44%; bottom: 10%; width: 10%; border-radius: 10px; } .rocket-window { position: relative; left: 12.5%; top: 15%; height: 110px; width: 110px; background: grey; border-radius: 50%; background: $window; border: 5px solid #929ED5; overflow: hidden; animation: centrifuge 10s infinite linear; } .astronaut { height: 100%; width: 100%; position: relative; } .head { height: 90%; width: 90%; position: relative; left: 10%; bottom: 0%; } .face { position: absolute; height: 80%; width: 75%; background: $skin; bottom: 0%; left: 7%; border-radius: 30px 30px 50% 50%; z-index: 1; } .hair { position: relative; height: 100%; width: 100%; top: 10%; left: 0%; } .lock { position: absolute; background: $lock; border-radius: 50%; } .lock-1 { height: 33px; width: 47px; left: -6px; top: 0; z-index: 2; } .lock-2 { height: 25px; width: 41px; left: 29px; top: 4px; z-index: 2; } .lock-3 { height: 24px; width: 20px; left: 62px; top: 13px; z-index: 2; border-radius: 50% 50% 0 50%; } .lock-4 { height: 59px; width: 20px; left: 0px; top: 6px; z-index: 0; } .lock-5 { height: 50px; width: 20px; right: 13px; top: 16px; z-index: 0; } .eye { position: absolute; top: 50%; height: 10px; width: 7px; background: $lock; border-radius: 50%; } .eye-left { left: 20%; } .eye-right { right: 20%; } .eyebrow { position: absolute; height: 5px; width: 17px; background: $lock; border-radius: 50% 50% 0 0; top: 40%; } .eyebrow-left { left: 15%; transform-origin: 5px 10px; animation: leftBrowUp 10s infinite; } .eyebrow-right { right: 15%; transform-origin: 10px 10px; animation: rightBrowUp 10s infinite; } .mouth { position: absolute; height: 6px; width: 12px; bottom: 10px; left: 38%; background: none; border: 4px solid $mouth; border-radius: 0 0 50px 50px; border-top: none; animation: openMouth 10s infinite; } .spacesuit { position: absolute; left: 5%; bottom: -4px; height: 60%; width: 84%; background: rgba(255, 255, 255, 0.3); border: 3px solid rgba(255, 255, 255, 0.5); border-radius: 50%; } .fire { position: absolute; bottom: 0; left: 25%; width: 100px; height: 100px; } .fire-outer-container { position: relative; height: 100%; width: 100%; animation: fireOutAnim 0.5s cubic-bezier(0,.62,.4,1.01) infinite; } .fire-outer { position: absolute; bottom: -40px; left: -10%; width: 120px; height: 100px; background: $fire-out; } .fire-inner { position: absolute; bottom: 20px; left: 15%; width: 70px; height: 70px; border-radius: 0 50% 50% 50%; background: $fire-inn; transform: rotate(225deg); animation: fireInAnim 1s linear alternate infinite both; } .traces { position: absolute; height: 100%; width: 80%; left: 10%; z-index: 20; } .trace { position: absolute; width: 2px; height: 100%; border-radius: 2px; overflow: hidden; } .trace-1 { top: 20%; height: 110%; } .trace-2 { top: 0%; left: 20%; height: 60%; } .trace-3 { top: -20%; right: 20%; height: 50%; } .trace-4 { top: 40%; right: 15%; height: 60%; } .trace-5 { top: 10%; right: 5%; height: 70%; } .trace-6 { top: 40%; left: 15%; height: 40%; } .trace-7 { bottom: 0%; left: 70%; height: 40%; } .trace-8 { bottom: -20%; left: 30%; height: 70%; } .shine{ position: absolute; width: 100%; background: $trace; z-index: 3; border-radius: 5px; opacity: 0; } .trace:nth-child(1) > .shine-1 { animation-delay: 0.5s; } .trace:nth-child(1) > .shine-2 { animation-delay: 1.5s; } .trace:nth-child(3) > .shine-1 { animation-delay: 0.2s; } .trace:nth-child(3) > .shine-2 { animation-delay: 1.2s; } .trace:nth-child(5) > .shine-1 { animation-delay: 0.4s; } .trace:nth-child(5) > .shine-2 { animation-delay: 1.4s; } .trace:nth-child(7) > .shine-1 { animation-delay: 0.6s; } .trace:nth-child(7) > .shine-2 { animation-delay: 1.6s; } .trace:nth-child(8) > .shine-1 { animation-delay: 0.2s; } .trace:nth-child(8) > .shine-2 { animation-delay: 1.2s; } .shine-1 { height: 20%; animation: shine 0.8s infinite linear both; } .shine-2 { height: 40%; animation: shine 0.8s 1s infinite linear both; } .steam { position: relative; height: 50%; width: 100%; top: 50%; left: 0%; } .steam-cloud { background: #fff; height: 50px; width: 50px; border-radius: 50%; position: absolute; left: 36%; top: -44px; opacity: 1; transform: scale(1); } .steam-cloud-1 { animation: steamBirth1 1s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-2 { animation: steamBirth2 1s 0.1s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-3 { animation: steamBirth1 1s 0.2s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-4 { animation: steamBirth2 1s 0.3s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-5 { animation: steamBirth1 1s 0.4s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-6 { animation: steamBirth2 1s 0.5s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-7 { animation: steamBirth1 1s 0.6s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-8 { animation: steamBirth2 1s 0.7s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-9 { animation: steamBirth1 1s 0.8s infinite both cubic-bezier(0,.07,0,.99); } .steam-cloud-10 { animation: steamBirth2 1s 0.9s infinite both cubic-bezier(0,.07,0,.99); } @keyframes fireOutAnim { 0% { transform: scaleY(1); } 50% { transform: scaleY(1.1); } 100% { transform: scaleY(1); } } @keyframes fireInAnim { 0% { transform: rotate(215deg); } 50% { transform: rotate(225deg); } 100% { transform: rotate(235deg); } } @keyframes shine{ 0%{ top: -10%; opacity: 1; } 50%, 100% { top: 110%; opacity: 1; } } @keyframes steamBirth1 { 0% { transform: scale(0); opacity: 0; left: 36%; top: 0%; } 20% { transform: scale(1); opacity: 1; left: 40%; top: 100px; } 75% { opacity: 1; } 80% { transform: scale(1.5); opacity: 0.5; left: 20%; top: 200px; } 90% { opacity: 0.5; transform: scale(2); } 95% { transform: scale(1.5); left: 45%; top: 200px; } 100% { opacity: 0; transform: scale(2); left: 40%; top: 200px; } } @keyframes steamBirth2 { 0% { transform: scale(0); opacity: 0; left: 36%; top: 0%; } 20% { transform: scale(1); opacity: 1; left: 30%; top: 100px; } 75% { opacity: 1; } 80% { transform: scale(1.5); opacity: 0.5; left: 50%; top: 200px; } 90% { opacity: 0.5; transform: scale(2); } 95% { transform: scale(1.5); left: 25%; top: 200px; } 100% { opacity: 0; transform: scale(2); left: 30%; top: 200px; } } @keyframes centrifuge { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes leftBrowUp { 0%, 15% { transform: rotate(0deg); } 16%, 84% { transform: rotate(-40deg); } 85%, 100% { transform: rotate(0deg); } } @keyframes rightBrowUp { 0%, 15% { transform: rotate(0deg); } 16%, 84% { transform: rotate(40deg); } 85%, 100% { transform: rotate(0deg); } } @keyframes openMouth { 0%, 15% { height: 6px; width: 12px; bottom: 10px; left: 38%; background: none; border: 4px solid $mouth; border-top: none; border-radius: 0 0 50px 50px; } 16%, 84% { height: 12px; width: 10px; bottom: 10px; left: 38%; background: $mouth; border: 4px solid $mouth; border-top: none; border-radius: 50px; } 85%, 100% { height: 6px; width: 12px; bottom: 10px; left: 38%; background: none; border: 4px solid $mouth; border-top: none; border-radius: 0 0 50px 50px; } } @keyframes rocketShake { 0% { left: 30%; top: 0%; height: 90%; width: 40%; transform: scale(1); } 20% { left: 30%; top: -1%; height: 90%; width: 40%; transform: scale(1.05); } 40% { left: 30.5%; top: -1%; height: 90%; width: 40%; } 60% { left: 30%; top: 0%; height: 90%; width: 40%; } 80% { left: 30%; top: 0.5%; height: 90%; width: 40%; transform: scale(1.02); } 100% { left: 29.5%; top: 0.5%; height: 90%; width: 40%; } } $fireColor: rgb(255,80,0); $fireColorT: rgba(255,80,0,0); $dur: 1s; $blur: 0.02em; $fireRad: 3em; $parts: 50; $partSize: 5em; body { background-color: rgb(48,8,8); margin: 0; } .fire { font-size: 24px; filter: blur($blur); -webkit-filter: blur($blur); margin: 3em auto 0 auto; position: relative; width: 10em; height: 12em; } .particle { animation: rise $dur ease-in infinite; background-image: radial-gradient($fireColor 20%,$fireColorT 70%); border-radius: 50%; mix-blend-mode: screen; opacity: 0; position: absolute; bottom: 0; width: $partSize; height: $partSize; // spread particles out in time and x-position to get desired effect @for $p from 1 through $parts { &:nth-of-type(#{$p}) { animation-delay: $dur * random(); left: calc((100% - #{$partSize}) * #{($p - 1)/$parts}); } } } @keyframes rise { from { opacity: 0; transform: translateY(0) scale(1); } 25% { opacity: 1; } to { opacity: 0; transform: translateY(-10em) scale(0); } }