HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<bg></bg>
<screen>
<start>
<shadow></shadow>
<card>
<back></back>
<front>
<x>
<x></x>
<x>
<x>
<x></x>
</x>
<x>
<x>
<x></x>
<x></x>
</x>
<x>
<x></x>
</x>
<x></x>
</x>
<x></x>
<x></x>
<x></x>
<x></x>
<x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
</x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
</x>
</x>
<x>
<x></x>
<x>
<x>
<x></x>
</x>
<x>
<x>
<x></x>
<x></x>
</x>
<x>
<x></x>
</x>
<x></x>
</x>
<x></x>
<x></x>
<x></x>
<x></x>
<x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
</x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
</x>
</x>
</front>
</card>
</start>
<scroll>
<shadow></shadow>
<card>
<back></back>
<front>
<x>
<x></x>
<x>
<x>
<x></x>
</x>
<x>
<x>
<x></x>
<x></x>
</x>
<x>
<x></x>
</x>
<x></x>
</x>
<x></x>
<x></x>
<x></x>
<x></x>
<x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
</x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
</x>
</x>
<x>
<x></x>
<x>
<x>
<x></x>
</x>
<x>
<x>
<x></x>
<x></x>
</x>
<x>
<x></x>
</x>
<x></x>
</x>
<x></x>
<x></x>
<x></x>
<x></x>
<x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
</x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
<x></x>
</x>
</x>
</front>
</card>
</scroll>
<text>
Scroll <flip><span>↓</span></flip>
</text>
</screen>
<a class="sig" href="https://tinydesign.co.uk/" title="Ben Evans Portfolio"><u></u></a>
@mixin scroll {
// ↓ THIS IS ALL THAT'S REQUIRED! 😮
card, card:before, card:after, shadow, input {
animation-timeline: scroll();
}
// ↑ THIS IS ALL THAT'S REQUIRED! 😮
}
$body: #190d23;
$none: rgba(#fff,0);
$card: #f5e3e3;
$blue: #302E9B;
$red: #B32B28;
$yellow: #BDB725;
html {
font-size: .7vh;
}
body {
color: $body;
font-size: 12rem;
font-family: 'Courier New';
height: 300vh;
}
screen{
*, *:before, *:after {
box-sizing: border-box;
content: '';
display: block;
transform-style: preserve-3d;
position: relative;
perspective: 200rem;
}
}
screen, bg, start, scroll {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
bg {
background: radial-gradient( #BD243F, $body);
background-size: 100% 75vh;
transform: translate3d(0,0,100rem);
}
text {
position: absolute;
right: 6rem;
bottom: 6rem;
color: $card;
opacity: 0;
animation: show 1s linear forwards;
span, flip {
display: inline-block;
animation: bob 1.2s ease-in-out infinite;
}
flip {
animation: flip linear;
animation-timeline: scroll();
}
}
@keyframes flip {
100% {
transform: scaleY(-1);
}
}
@keyframes bob {
50% {
transform: translate3d(0,1rem,0);
}
}
card {
margin: auto;
height: 96rem;
width: 64.5rem;
background: #fff;
border-radius: 5rem;
transform: translate3d(0,0,0) rotate3d(0,0,0,0) rotate(1deg);
position: relative;
top: 6rem;
& *, & *:before, & *:after, &:before, &:after {
position: absolute;
left: 0;
top: 0;
}
&:before, &:after {
width: 100%;
height: 100%;
transform: translate3d(0,0,-.2rem) rotateY(180deg);
border-radius: 5rem;
box-shadow: inset 0 0 1rem rgba($body,.5);
background-image: linear-gradient(to right bottom, rgba($body,.2),$none,rgba(#fff,.1),$none,rgba($body,.3));
}
&:after {
transform: translate3d(0,0,.2rem) rotateY(0deg);
}
}
back {
box-shadow: 0 0 0 1rem $blue, inset 0 0 0 1rem $blue, inset 0 0 0 2rem $card;
border-radius: 1rem;
height: 93%;
width: 90%;
border: 2rem solid $none;
background-position: .9rem .99rem;
background-image: repeating-linear-gradient( 45deg, $none, $none .99rem, $blue .99rem, $blue 1.98rem), repeating-linear-gradient( -45deg, $none, $none .99rem, $blue .99rem, $blue 1.98rem );
transform: translate3d(0,0,-.1rem) rotateY(180deg);
bottom: 0;
right: 0;
margin: auto;
}
shadow {
margin: auto;
height: 100rem;
width: 70rem;
background: radial-gradient($body,$none);
background: $body;
border-radius: 10rem;
position: relative;
position: absolute;
left: 0;
right: 0;
top: 0;
transform: translate3d(0,90rem,-50rem) rotateX(90deg) rotate(0deg) skewY(0) scale(1);
opacity: .2;
box-shadow: 0 0 2vmin $body, 0 0 5vmin $body;
}
@keyframes rotate {
100% {
transform: translate3d(0,0,0) rotate3d(1,1,0,-360deg) rotate(1deg);
}
}
@keyframes light {
0%,100%,50% {
background-color: $none;
}
25% {
background-color: rgba($card,.7);
}
75% {
background-color: $body;
}
}
@keyframes shadow {
25% {
transform: translate3d(0,90rem,-50rem) rotateX(90deg) rotate(90deg) skewY(-90deg);
opacity: 0;
}
50% {
transform: translate3d(0,90rem,-50rem) rotateX(90deg) rotate(90deg) skewY(0);
opacity: .2;
}
75% {
transform: translate3d(0,90rem,-50rem) rotateX(90deg) rotate(90deg) skewY(90deg);
opacity: 0;
}
100% {
transform: translate3d(0,90rem,-50rem) rotateX(90deg) rotate(180deg) skewY(0);
opacity: .2;
}
}
start {
card {
animation: rotate 1s linear forwards;
&:before, &:after {
animation: light 1s linear forwards;
}
&:after {
animation: light 1s linear reverse;
}
}
shadow {
animation: shadow 1s linear forwards;
}
animation: hide 1s linear forwards;
}
scroll {
animation: show 1s linear forwards;
opacity: 0;
& card {
animation: rotate 1s linear forwards;
&:before, &:after {
animation: light 1s linear forwards;
}
&:after {
animation: light 1s linear reverse;
}
}
& shadow {
animation: shadow 1s linear forwards;
}
@include scroll;
}
@keyframes hide {
99% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes show {
100% {
opacity: 1;
}
99% {
opacity: 0;
}
}
//king
front {
transform: translate3d(0,0,.1rem) rotateY(0deg);
height: 100%;
width: 100%;
//number
& > * {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
& > *:nth-of-type(1) {
transform: translate3d(2rem, 13rem, 0) scaleX(.7);
height: 4rem;
width: 4rem;
background: $red;
border-radius: 50%;
box-shadow: 3.25rem 0 0 $red;
&:before {
transform: translate3d(1.7rem,1.7rem,0) rotate(45deg);
background: $red;
width: 4rem;
height: 4rem;
}
&:after {
content: 'K';
color: $red;
transform: translate3d(0,-12rem,0);
}
}
//picture
& > *:nth-of-type(2) {
border: .5rem solid $blue;
width: 68%;
height: 79.5%;
bottom: 0;
right: 0;
margin: auto;
border-radius: .5rem;
overflow: hidden;
//crown
& > *:nth-of-type(6) {
background: $yellow;
box-shadow: inset 0 0 0 .1rem #fff, inset 0 0 0 .6rem $blue;
width: 30rem;
height: 30rem;
transform: translate3d(7rem, -23rem, 0) rotate(37deg) skewY(20deg);
overflow: hidden;
&:after {
background: #fff;
width: 40rem;
height: 10rem;
border-radius: 50%;
transform: translate3d(4rem, 25.5rem, 0) rotate(-50deg);
box-shadow: 0 0 0 1.5rem $body;
}
&:before {
width: 1.5rem;
height: 1.5rem;
transform: translate3d(16.5rem, 26.5rem, 0) rotate(-1deg);
background: $body;
box-shadow: 0 0 0 1.5rem $yellow, 0 0 0 2rem $body, 5rem -5rem 0 $body, 5rem -5rem 0 1.5rem $yellow, 5rem -5rem 0 2rem $body, 10rem -10rem 0 $body, 10rem -10rem 0 1.5rem $yellow, 10rem -10rem 0 2rem $body;
}
}
//heart
& > *:nth-of-type(8) {
transform: translate3d(.5rem, 2.5rem, 0) scaleX(.7);
height: 8rem;
width: 8rem;
background: $red;
border-radius: 50%;
box-shadow: 6.5rem 0 0 $red;
&:before {
transform: translate3d(3.25rem,3.25rem,0) rotate(45deg);
background: $red;
width: 8rem;
height: 8rem;
}
}
//face
& > *:nth-of-type(7) {
width: 40rem;
height: 20rem;
transform: translate3d(-.5rem, 6.5rem, 0);
border-radius: 50%;
overflow: hidden;
&:after {
width: 5rem;
height: 14rem;
border-radius: 3rem;
transform: translate3d(21.5rem, -1rem, 0) rotate(-20deg) skewY(-10deg);
box-shadow: .4rem .4rem 0 $blue, 1rem .8rem 0 #fff, 1.4rem 1.2rem 0 $blue, 2rem 1.6rem 0 #fff, 2.4rem 2rem 0 $blue, 3rem 2.4rem 0 #fff, 3.4rem 2.8rem 0 $blue, 4rem 3.2rem 0 #fff, 4.4rem 3.6rem 0 $blue;
}
//spiral
&:before {
width: 1rem;
height: 1rem;
background: #fff;
transform: translate3d(13.35rem, 7.85rem, 0);
border-radius: 50%;
box-shadow: .4rem 0 0 $blue, .4rem .4rem 0 .3rem #fff, .1rem .4rem 0 .6rem $blue;
}
//hair
& > *:nth-of-type(1) {
width: 3rem;
height: 14rem;
border-radius: 2rem;
transform: translate3d(15rem, -4rem, 0) rotate(25deg);
box-shadow: .4rem .4rem 0 $blue, 1rem .8rem 0 #fff, 1.4rem 1.2rem 0 $blue, 2rem 1.6rem 0 #fff, 2.4rem 2rem 0 $blue, 3rem 2.4rem 0 #fff, 3.4rem 2.8rem 0 $blue, 4rem 2.3rem 0 #fff, 4.4rem 2.6rem 0 $blue, 5rem 2rem 0 #fff, 5.4rem 2.1rem 0 $blue;
//face shape
&:after {
background: #fff;
width: 10.8rem;
height: 12rem;
border-radius: 5rem 0 60% 2rem / 1.25rem 0 60% 5rem;
transform: translate3d(1.5rem, 1rem, 0) rotate(-29deg);
box-shadow: -.4rem -.3rem 0 $blue;
}
//big beardy bit
&:before {
width: 7rem;
height: 10rem;
border-radius: 2.5rem;
transform: translate3d(6.5rem, 4rem, 0) rotate(-55deg);
border: .4rem solid #fff;
box-shadow: 0 0 0 .4rem $blue, inset 0 0 0 .4rem $blue, inset .5rem 0 0 .4rem #fff, inset .9rem 0 0 .4rem $blue, inset 1.4rem .2rem 0 .4rem #fff, inset 1.8rem .2rem 0 .4rem $blue, inset 2.3rem .4rem 0 .4rem #fff, inset 2.7rem .4rem 0 .4rem $blue, inset 3.2rem .8rem 0 .4rem #fff, inset 3.6rem .8rem 0 .4rem $blue, inset -.5rem 0 0 .4rem #fff, inset -.9rem 0 0 .4rem $blue, inset -1.4rem .2rem 0 .4rem #fff, inset -1.8rem .2rem 0 .4rem $blue, inset -2.3rem .4rem 0 .4rem #fff, inset -2.7rem .4rem 0 .4rem $blue,
}
}
//more curls
& > *:nth-of-type(2) {
width: 1.5rem;
height: 1.5rem;
background: #fff;
transform: translate3d(25rem, 10.65rem, 0);
border-radius: 50%;
box-shadow: .4rem 0 0 $blue, .4rem .4rem 0 .4rem #fff, .1rem .4rem 0 .6rem $blue;
&:after {
width: 1rem;
height: 1rem;
background: #fff;
transform: translate3d(-1.5rem, 1.2rem, 0) rotate(-70deg);
border-radius: 50%;
box-shadow: -.4rem 0 0 $blue, -.4rem .4rem 0 .4rem #fff, -.1rem .4rem 0 .6rem $blue;
}
&:before {
width: .75rem;
height: .75rem;
background: #fff;
transform: translate3d(-11.25rem, -7rem, 0) rotate(-50deg);
border-radius: 50%;
box-shadow: .4rem 0 0 $blue, .4rem .4rem 0 .3rem #fff, .1rem .4rem 0 .6rem $blue;
}
}
//face
//eyebrows
& > *:nth-of-type(4) {
width: 3rem;
height: 1rem;
border-radius: 50%;
border-top: .4rem solid $blue;
transform: translate3d(21rem, 1rem, 0);
box-shadow: -5rem .4rem 0 #fff, -5.5rem 0 0 $blue;
//none
&:after {
width: .3rem;
height: 2rem;
background: $blue;
transform: translate3d(-2.65rem,0,0) rotate(-15deg);
}
&:before {
width: 2.5rem;
height: 5rem;
border-radius: 2rem;
transform: translate3d(-2.5rem,1.25rem,0) rotate(15deg) skewY(-10deg);
box-shadow: -.2rem .3rem 0 $blue;
background: #fff;
}
}
//eye1
& > *:nth-of-type(5) {
width: .6rem;
height: .6rem;
background: $blue;
border-radius: 50%;
box-shadow: 0 0 0 .5rem #fff, 0 0 0 .8rem $blue;
transform: translate3d(21.5rem, 3rem, 0) rotate(5deg);
&:before {
width: 3.5rem;
height: 3rem;
border-radius: 50%;
border-top: .4rem solid $blue;
transform: translate3d(-1rem, -.4rem, 0);
box-shadow: 0 -.8rem 0 -.4rem #fff;
}
&:after {
width: 1.5rem;
height: .75rem;
border-radius: 50%;
box-shadow: -.2rem .2rem 0 0 $blue;
transform: translate3d(-.75rem, 1rem, 0) rotate(20deg);
}
}
//eye2
& > *:nth-of-type(6) {
width: .6rem;
height: .6rem;
background: $blue;
border-radius: 50%;
box-shadow: 0 0 0 .5rem #fff, 0 0 0 .8rem $blue;
transform: translate3d(16.6rem, 2.75rem, 0) rotate(5deg);
&:before {
width: 3.5rem;
height: 3rem;
border-radius: 50%;
border-top: .4rem solid $blue;
transform: translate3d(-1rem, -.4rem, 0);
box-shadow: 0 -.8rem 0 -.4rem #fff;
}
&:after {
width: 1rem;
height: .75rem;
border-radius: 50%;
box-shadow: 0 .2rem 0 0 $blue;
transform: translate3d(-.75rem, 1rem, 0) rotate(30deg);
}
}
//nose
& > *:nth-of-type(3) {
width: 2rem;
height: 1.25rem;
background: #fff;
border-radius: 50%;
box-shadow: .3rem 0 0 0 $blue;
transform: translate3d(18.75rem, 6rem, 0) rotate(45deg);
&:before {
width: 4rem;
height: 4rem;
transform: translate3d(.25rem,.25rem,0);
box-shadow: -.2rem -.2rem 0 $blue;
border-radius: 1rem;
}
//chin
&:after {
width: 1rem;
height: 1rem;
box-shadow: 0 -.4rem 0 $blue;
transform: translate3d(3.25rem,3.25rem,0) rotate(-45deg);
border-radius: 50%;
}
}
//mouth
& > *:nth-of-type(7) {
width: .6rem;
height: .6rem;
background: $blue;
border-radius: 50%;
box-shadow: 1rem 0 0 0 $blue, .5rem .3rem 0 0 $blue;
transform: translate3d(18.75rem, 8.5rem, 0);
&:after {
width: 3.2rem;
height: .5rem;
box-shadow: 0 -.2rem 0 $blue;
transform: translate3d(-.7rem,.4rem,0);
border-radius: 50%;
}
}
}
//hand
& > *:nth-of-type(5) {
transform: translate3d(36rem, 5rem,0);
border: .3rem solid $blue;
width: 2rem;
height: 3.85rem;
border-radius: 1rem;
background: #fff;
box-shadow: .75rem .3rem 0 -.3rem #fff, .75rem .3rem 0 $blue, 1.75rem .5rem 0 -.5rem #fff, 1.75rem .5rem 0 -.2rem $blue, 2.65rem .6rem 0 -.8rem #fff, 2.65rem .6rem 0 -.4rem $blue;
&:before {
transform: translate3d(-1rem, -.75rem,0);
border: .5rem solid $blue;
border-bottom: none;
width: 1.65rem;
height: 4rem;
border-radius: 1rem 1rem 0 0;
background: #fff;
}
&:after {
transform: translate3d(0, 3.5rem,0);
width: 2rem;
height: 2rem;
border-radius: 0 100% 0 0;
box-shadow: .3rem -.3rem 0 $blue;
}
}
//sword handle
& > *:nth-of-type(4) {
transform: translate3d(35.25rem, 6.5rem,0);
border: .5rem solid $blue;
width: 4.75rem;
height: 5.5rem;
border-radius: 50%;
background: #fff;
&:before {
transform: translate3d(4rem, -.1rem,0);
width: 2rem;
height: 2rem;
border-radius: 100%;
box-shadow: 0 0 0 .5rem $blue,inset 0 -.25rem 0 .5rem $yellow, inset 0 -.5rem 0 1rem $blue;
background: $yellow;
}
&:after {
transform: translate3d(-1.5rem, -3rem,0);
width: 1rem;
height: 7rem;
border-radius: .5rem;
box-shadow: 0 0 0 .5rem $blue;
background: $yellow;
}
}
//sword blade
& > *:nth-of-type(3) {
transform: translate3d(31.25rem, 6rem,0);
border: .5rem solid $blue;
width: 3rem;
height: 3rem;
box-shadow: inset 0 0 0 .5rem #fff, inset 0 0 0 1rem $blue, -3rem 0 0 0 $blue;
&:before {
transform: translate3d(4rem, 5rem,0);
width: 3.5rem;
height: 1.5rem;
border-radius: 50%;
box-shadow: 0 0 0 .5rem $blue;
background: $yellow;
}
&:after {
}
}
//arm
& > *:nth-of-type(1) {
transform: translate3d(30rem,13rem,0);
height: 20rem;
width: 20rem;
background: $yellow;
&:before {
border-radius: 50%;
background: #fff;
width: 10rem;
height: 30rem;
box-shadow: -.4rem .4rem 0 0 $blue, -12.5rem -1rem 0 0rem #fff, -12rem -1rem 0 0rem $blue;
transform: translate3d(9rem,-22rem,0);
}
&:after {
background: #fff;
width: 30rem;
height: 20rem;
transform: translate3d(0rem,-20rem,0);
}
& > *:nth-of-type(1) {
background: $red;
border: .5rem solid $blue;
transform: translate3d(5rem, 9rem, 0) rotate(-40deg) skewY(-30deg);
width: 10rem;
height: 10rem;
box-shadow: 0 0 0 1rem $yellow,0 0 0 1.5rem $blue;
z-index: -1;
border-radius: 50% 0;
&:before {
background: $red;
border: .5rem solid $blue;
transform: translate3d(-4rem, -5.5rem, 0) rotate(20deg) skewY(0deg);
width: 10rem;
height: 10rem;
box-shadow: 0 0 0 1rem $yellow,0 0 0 1.5rem $blue;
border-radius: 50% 0;
}
&:after {
background: $blue;
transform: translate3d(11.75rem, -11.75rem, 0) rotate(15deg) skewY(0deg);
width: 10rem;
height: 10rem;
box-shadow: 0 0 0 .5rem $yellow,0 0 0 1rem $blue;
border-radius: 50% 0;
}
}
}
//body
& > *:nth-of-type(2) {
border: .5rem solid $blue;
transform: translate3d(-6.5rem, 16rem,0);
width: 56rem;
height: 43rem;
border-radius: 50% 48%;
box-shadow: inset 0 0 0 1rem $yellow, inset 0 0 0 4.5rem $blue, inset 0 0 0 5rem $yellow, inset 0 0 0 5.5rem $blue;
background: linear-gradient( $red, $red 50%, #fff 50%, #fff );
background-size: 100% 1rem;
overflow: hidden;
&:before {
width: 2rem;
height: 2rem;
background: #BDB725;
transform: translate3d(45.75rem, 31.4rem, 0);
box-shadow: -2.5rem 2rem 0 0 $yellow, -5.5rem 4rem 0 0 $yellow;
}
&:after {
width: 2rem;
height: 2rem;
background: $body;
transform: translate3d(45.7rem, 31.3rem, 0) rotate(-45deg);
box-shadow: inset 0 0 0 .55rem $yellow, -3.25rem -.25rem 0 -.55rem $body, -3.25rem -.25rem 0 0 $yellow, -6.75rem -1rem 0 -.55rem $body, -6.75rem -1rem 0 0 $yellow;
}
& > *:nth-of-type(2) {
width: 50rem;
height: 60rem;
border: 5rem solid #fff;
border-left-width: 3rem;
transform: translate3d(30rem, -9rem, 0);
box-shadow: inset 0 0 0 .5rem $blue, 0 0 0 .5rem $blue;
border-radius: 50%;
overflow: hidden;
&:before {
width: 40rem;
height: 31rem;
background: $red;
box-shadow: inset 5rem 14rem 0 0 $blue, inset 0 14.9rem 0 0 $yellow, inset 0 15.3rem 0 0 $blue;
transform: translate3d(0, 0, 0);
}
&:after {
width: 2rem;
background: $yellow;
height: 30rem;
transform: translate3d(10.5rem, 0rem, 0);
border: solid .5rem $blue;
}
& > *:nth-of-type(1) {
width: 24rem;
height: 24rem;
border: 1rem solid $body;
transform: translate3d(-15rem, 6rem, 0);
border-radius: 50%;
box-shadow: inset 0 0 0 1rem $yellow, inset 0 0 0 1.5rem $body, inset 0 0 0 3.5rem #fff, inset 0 0 0 4rem $body, inset 0 0 0 4.5rem $yellow, inset 0 0 0 5rem $body;
background: linear-gradient( $red, $red 50%, #fff 50%, #fff );
background-size: 100% 1rem;
&:before {
width: 18rem;
height: 18rem;
border: 1rem dotted $red;
bottom: 0;
right: 0;
margin: auto;
border-radius: 50%;
}
&:after {
width: 5rem;
height: 5rem;
transform: translate3d(29rem, 5rem, 0) rotate(45deg);
background: $red;
box-shadow: 0 0 0 .4rem $blue, 0 0 0 .9rem $yellow, 0 0 0 1.1rem $blue, 0 0 0 1.6rem $yellow, 0 0 0 2rem $blue, 4rem 4rem 0 0 $red, 4rem 4rem 0 .4rem $blue, 4rem 4rem 0 .9rem $yellow, 4rem 4rem 0 1.1rem $blue, 4rem 4rem 0 1.6rem $yellow, 4rem 4rem 0 2rem $blue, 8rem 8rem 0 0 $red, 8rem 8rem 0 .4rem $blue, 8rem 8rem 0 .9rem $yellow, 8rem 8rem 0 1.1rem $blue, 8rem 8rem 0 1.6rem $yellow, 8rem 8rem 0 2rem $blue, -4rem -4rem 0 0 $red, -4rem -4rem 0 .4rem $blue, -4rem -4rem 0 .9rem $yellow, -4rem -4rem 0 1.1rem $blue, -4rem -4rem 0 1.6rem $yellow, -4rem -4rem 0 2rem $blue;
}
}
}
//inner shirt
& > *:nth-of-type(1) {
width: 16rem;
height: 53rem;
transform: translate3d(20rem, 0rem, 0);
overflow: hidden;
&:before {
height: 20rem;
width: 35rem;
background: $red;
transform: translate3d(-10rem, -10rem, 0) rotate(-45deg);
}
&:after {
height: 5rem;
width: 30rem;
background: #fff;
transform: translate3d(-10rem, 10rem, 0) rotate(-45deg);
border: .5rem solid #fff;
box-shadow: inset 0 0 0 .4rem $blue, 0 0 0 .4rem $blue;
background: #fff;
background-image: radial-gradient($red 25%, $yellow 35%, $body 45%, transparent 0), radial-gradient($red 25%, $yellow 35%, $body 45%, transparent 0);
background-size: 6rem 6rem;
background-position: 0 0, 3rem 3rem;
}
& > *:nth-of-type(1) {
transform: translate3d(0rem, 18rem, 0);
background: $blue;
height: 5rem;
width: 20rem;
&:before {
height: 20rem;
width: 35rem;
background: $red;
transform: translate3d(-10rem, 15rem, 0) rotate(-45deg);
}
&:after {
height: 5rem;
width: 30rem;
background: #fff;
transform: translate3d(-10rem, 12rem, 0) rotate(-45deg);
border: .5rem solid #fff;
box-shadow: inset 0 0 0 .4rem $blue, 0 0 0 .4rem $blue;
background: #fff;
background-image: radial-gradient($red 25%, $yellow 35%, $body 45%, transparent 0), radial-gradient($red 25%, $yellow 35%, $body 45%, transparent 0);
background-size: 6rem 6rem;
background-position: 0 0, 3rem 3rem;
}
}
}
//decoration
& > *:nth-of-type(3) {
width: 50rem;
height: 60rem;
border: 2rem dotted $blue;
transform: translate3d(31rem, -9rem, 0);
border-radius: 50%;
}
}
& > *:nth-of-type(9) {
width: 50rem;
height: 37rem;
transform: translate3d(25rem, 19rem, 0);
overflow: hidden;
&:after {
width: 50rem;
height: 53rem;
transform: translate3d(2rem, -8rem, 0);
box-shadow: inset 0 0 0 0.5rem #302E9B, 0 0 0 1rem #fff;
border-radius: 50%;
}
&:before {
width: 15rem;
background: $body;
height: 2rem;
transform: translate3d(8.5rem, 0, 0) skewX(-35deg);
box-shadow: 0 0 0 .5rem $blue, 0 0 0 1rem $body, 0 0 0 1.5rem $yellow;
}
}
& > *:nth-of-type(12) {
transform: translate3d(-1rem, 21.5rem, 0);
width: 45rem;
height: 32rem;
border-radius: 50%;
overflow: hidden;
&:before {
width: 20rem;
height: 8rem;
background: repeating-linear-gradient( -45deg, $blue, $blue .2rem, $none .2rem, $none 1rem), $yellow;
transform: translate3d(38rem, 19rem, 0);
border: .5rem solid $blue;
}
&:after {
width: 2.5rem;
height: 5rem;
transform: translate3d(33.5rem, 20.25rem, 0);
background: $yellow;
border: .4rem solid $blue;
border-radius: 50%;
}
}
// bottom hand
& > *:nth-of-type(13) {
transform: translate3d(28.5rem, 46rem,0);
border: .4rem solid $blue;
border-top: none;
width: 4.25rem;
height: 2rem;
border-radius: 1.5rem 0 100% .75rem;
background: #fff;
box-shadow: .75rem -1rem 0 $blue;
&:before {
transform: translate3d(-4rem, -2rem,0);
border: .4rem solid $blue;
border-right: none;
width: 5.5rem;
height: 1.8rem;
border-radius: 1rem 0 0 1rem;
background: #fff;
box-shadow: .7rem 1rem 0 -.4rem #fff, .3rem 1.4rem 0 -.4rem $blue, .8rem -1.3rem 0 -.5rem #fff, .8rem -1.3rem 0 -.1rem $blue, 1.8rem -2.3rem 0 -.6rem #fff, 1.8rem -2.3rem 0 -.2rem $blue;
}
&:after {
transform: translate3d(1rem, -4.2rem,0);
width: 4rem;
height: 4.5rem;
border-radius: 0 100% 100% 0;
border: .4rem solid $blue;
border-left: none;
border-bottom: none;
background: #fff;
}
}
// bottom wrist
& > *:nth-of-type(10) {
width: 10rem;
height: 8rem;
transform: translate3d(32.5rem, 40.5rem, 0);
overflow: hidden;
&:before {
border-radius: 50%;
transform: translate3d(-2.5rem,-2.5rem,0);
width: 7.5rem;
height: 5rem;
border: .5rem solid $blue;
box-shadow: 0 0 0 1rem $yellow;
}
&:after {
border-radius: 50%;
transform: translate3d(-2.5rem,5rem,0);
width: 7.5rem;
height: 6rem;
border: .5rem solid $blue;
box-shadow: 0 0 0 1rem $yellow;
}
}
//arm
& > *:nth-of-type(11) {
width: 10rem;
height: 4rem;
transform: translate3d(33.75rem, 42.2rem, 0) scaleY(.7);
overflow: hidden;
&:before {
}
&:after {
width: 2.5rem;
height: 2.5rem;
transform: translate3d(0rem, .5rem, 0) rotate(45deg);
background: $blue;
border: .75rem solid $yellow;
box-shadow: 0 0 0 .5rem $blue, 0 0 0 2rem $yellow;
}
}
}
}
& > *:nth-of-type(2) {
transform: rotate(180deg);
& > *:nth-of-type(2) {
& > *:nth-of-type(2) {
&:before {
transform: translate3d(45.75rem, 32.4rem, 0);
}
&:after {
transform: translate3d(45.7rem, 32.3rem, 0) rotate(-45deg);
}
background: none;
border: none;
box-shadow: none;
& > *:nth-of-type(1) {
display: none;
}
}
}
}
}
.sig {
&, * {
height: 9.25em;
overflow: hidden;
border-radius: .5em;
}
position: fixed;
left: 3rem;
top: 1rem;
font-size:1rem;
color: $red;
width: 10em;
transform: skewX(10deg) scaleY(.45) rotate(2deg);
&:before, *:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 5em;
height: 5em;
background: currentColor;
transform: translate3d(-2.5em,0,0) rotate(-45deg);
box-shadow: -3em 3em 0 0 currentColor;
border-radius: .5em 2em .5em 2em;
}
* {
width: 5em;
transform: translate3d(3.75em,0,0) scaleY(.95);
display: block !important;
&:before {
transform: translate3d(-3em,-2em,0) rotate(-45deg);
box-shadow: -3em 3em 0 0 currentColor, -6em 6em 0 0 currentColor;
border-radius: .5em;
}
}
}
// No images, just CSS
// Retro-fitted with animation-timeline: scroll();
// Gosh it's just too easy!
// instagram.com/ivorjetski
// x.com/ivorjetski
// The making of the original: https://www.youtube.com/watch?v=mUfsozWywwM
Also see: Tab Triggers