Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
Document
@charset "UTF-8"; @import url(https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800); *, :after, :before { box-sizing: border-box; padding: 0; margin: 0; } @property --blur { syntax: "
"; initial-value: 0; inherits: true; } @property --brightness { syntax: "
"; initial-value: 0; inherits: true; } @property --rotationY { syntax: "
"; initial-value: 0deg; inherits: true; } :root { --shape: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); } body { width: 100vw; height: 100vh; display: grid; place-items: center; background: url("https://assets.codepen.io/907471/DALL%C2%B7E+2024-11-07+22.19.21+-+A+very+dark%2C+hyper-futuristic+abstract+image+with+a+central+vanishing+point+and+a+high-tech+aesthetic.+The+color+palette+is+dominated+by+deep+blacks%2C+.webp") no-repeat center center, var(--color-surface); background-size: cover; color: var(--color-primary); font-family: "Helvetica Neue", monospace; font-weight: bold; font-size: 20vmin; margin: 0; perspective: 32rem; position: relative; overflow: hidden; &:after { content:''; backdrop-filter: blur(1.5rem); mask: radial-gradient(circle, transparent 50%, rgba(0,0,0,1) 75%); z-index:1; pointer-events:none; position: absolute; inset: 0; width: 100dvw; height: 100dvh; } } .container { position: relative; display: grid; place-items: center; transform-style: preserve-3d; animation: rotate 6s linear infinite; transform: rotate3d(0, 1, 0, var(--rotationY)); will-change: transform; --distance: 3vmin; } .left, .right { position: absolute; width: calc(var(--distance) * 4); height: 28vmin; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(0.3rem); } .right.top { transform: rotateY(90deg) rotateX(45deg) translateZ(14vmin); } .right.bottom { transform: rotateY(-90deg) rotateX(45deg) translateZ(-14vmin); } .left.bottom { transform: rotateY(90deg) rotateX(45deg) translateZ(-14vmin); } .left.top { transform: rotateY(90deg) rotateX(-45deg) translateZ(-14vmin); } .front, .back { position: absolute; transform-style: preserve-3d; width: 40vmin; aspect-ratio: 1; background: rgba(5, 5, 5, 0.1); backdrop-filter: blur(var(--blur)) brightness(var(--brightness)) invert(1) saturate(0.9); clip-path: var(--shape); transform: translateZ(calc(var(--distance) * 2)); box-shadow: inset 0 0 10rem rgba(255, 255, 5, 0.05); } .front { &:after { position: absolute; inset: 1rem; clip-path: var(--shape); background: rgba(255, 255, 255, 0.05); opacity: 0.8; display: grid; place-items: center; content: "☢︎"; transform-style: preserve-3d; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); } } .back { transform: translateZ(calc(var(--distance) * 1)); box-shadow: inset 1rem 0 20rem rgba(222, 5, 25, 0.3); &:nth-child(2) { transform: translateZ(calc(var(--distance) * 0)); box-shadow: inset 1rem 4rem 5rem rgba(2, 55, 205, 0.35); } &:nth-child(3) { transform: translateZ(calc(var(--distance) * -1)); box-shadow: inset 4rem 0rem 5rem rgba(255, 200, 2, 0.3); } &:nth-child(4) { transform: translateZ(calc(var(--distance) * -2)); box-shadow: inset -1rem -4rem 5rem rgba(25, 5, 255, 0.2); &:after { position: absolute; inset: 1rem; clip-path: var(--shape); background: rgba(255, 255, 255, 0.05); text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); opacity: 0.6; display: grid; place-items: center; content: "☢︎"; z-index: -1; } } } $b: 1.2; $b2: 3.35; $bl: 0.2vmin; $bl2: 5vmin; @keyframes rotate { from { --rotationY: 0deg; --blur: #{$bl}; --brightness: #{$b}; } 15%, 35%, 65%, 85% { --blur: #{$bl}; --brightness: #{$b}; } 25%, 75% { --blur: #{$bl2}; --brightness: #{$b2}; } to { --rotationY: 360deg; --blur: #{$bl}; --brightness: #{$b}; } } :root { --color-primary: #f4e8f1; --color-secondary: #75d8ee; --color-tertiary: #deee75; --color-quaternary: #9375ee; --color-surface: #131212; } * { box-sizing: border-box; }
console.log("Event Fired")