Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

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.

+ add another resource

Packages

Add Packages

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.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                div.main
    div.l
        div.l__face.l__face--front
            div.l__control
            div.l__control
            div.l__buttons
                div.l__button
                div.l__button
                div.l__button
            div.l__c1
                div.l__c2
                    div.l__clothes
                        div.l__clothes-i
                        div.l__clothes-i
                    
        div.l__face.l__face--back
        div.l__face.l__face--right
        div.l__face.l__face--left
        div.l__face.l__face--top
        div.l__face.l__face--bottom
            
    div.s
        div.l__face.s__shadow
              
            
!

CSS

              
                /* Variables */
$orange-1: #FFB791;
$orange-2: #F36955;

$green-1: #D3FFFD;
$green-2: #A0FFD7;
$green-3: #5ECD9D;

$white-1: #FEFFFF;
$white-2: #C8CFD4;

$circle-1: #E6F4F9;
$circle-2: #A5BBC5;
$circle-3: #8A9DA5;

/* Reset */
*, *::after, *::before {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
/* Generic */
body{
	display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background-color: $orange-1;
}
.main{
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 400px;
    height: 400px;
	
	@media(max-width: 800px){ transform: scale(.8); }
	@media(max-width: 700px){ transform: scale(.6); }
	@media(max-width: 500px){ transform: scale(.5); }
	@media(max-width: 400px){ transform: scale(.4); }
}
.l,
.s{
    position: relative;
    left: calc(50% - 300px);
    top: calc(50% - 300px);
    z-index: 300;
    transform-style: preserve-3d;
    transform:
        perspective(2000px)
        rotate3d(-500,-1000, 100, 30deg)
    ;
    animation: l .05s ease-in-out infinite alternate;
    &__face{
        position: absolute;
        height: 200px;
        width: 200px;
        z-index: 10;
    }
    &__face--front{
        display: flex;
        justify-content: center;
        align-items: center;
        transform: rotateY(0deg) translateZ(100px);
        background-image: linear-gradient(to bottom, $green-2 20%, $white-1 20%);
        border-top: 5px solid $green-1;
        border-bottom: 5px solid $white-2;
    }
    &__face--back{
        transform: rotateY(180deg) translateZ(100px);
        background-color: $white-2;
    }
    &__face--right{
        transform: rotateY(90deg) translateZ(100px);
        background-image: linear-gradient(to bottom, $green-3 20%, $white-2 20%);
        border-top: 5px solid lighten($green-3, 10);
    }
    &__face--left{
        transform: rotateY(-90deg) translateZ(100px);
        background-color: $white-1;
    }
    &__face--top{
        transform: rotateX( 90deg) translateZ(100px);
        background-color: $green-1;
    }
    &__face--bottom{
        transform: rotateX(-90deg) translateZ(100px);
        background-color: $white-2;
    }
    &__c1{
        display: flex;
        align-items: center;
        width: 120px;
        height: 120px;
        position: relative;
        border-radius: 50%;
        margin-top: 30px;
        border: 4px solid $green-1;
        box-shadow:
            0 0 0 1px rgba($white-2, .75),
            1px 1px 1px 1px rgba($white-2, .5);
        background-image: linear-gradient(200deg, $green-3 50%, darken($green-2, 15) 65%);
    }
    &__c2{
        position: absolute;
        right: 0px;
        width: 100px;
        height: 110px;
        border-radius: 50%;
        background-color: rgba($circle-1, 1);
        overflow: hidden;
        &::before{
            content: '';
            position: absolute;
            bottom: 20px;
            left: calc(50% - 100px);
            width: 200px;
            height: 200px;
            border-radius: 50%;
            background-image: linear-gradient(to bottom, darken(rgba($circle-3, 1), 35) , rgba($circle-3, .4) );
        }
        &::after{
            content: '';
            position: absolute;
            top: 30px;
            left: calc(50% - 40px);
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background-image: linear-gradient(to bottom, rgba($circle-2, .7) 50%, rgba($circle-2, .1) 60% );
        }
    }
    &__control{
        position: absolute;
        top: 6px;
        left: 20px;
        width: 25px;
        height: 25px;

        border-radius: 50%;
        background-color: $white-1;
        box-shadow:
            inset -1px 0 0 $white-2,
            3px 2px 0 $green-3;
        &:nth-of-type(2){ left: 55px;}
    }
    &__button{
        position: absolute;
        top: 16px;
        left: 100px;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        box-shadow:
            inset -1px 0 0 $white-2,
            1px 1px 0 $white-2;
        background-color: $orange-2;
        &:nth-of-type(2){ left: 110px;}
        &:nth-of-type(3){ left: 120px;}
    }
    &__clothes{
        position: absolute;
        top: 50px;
        left: 60px;
        width: 10px;
        height: 10px;
        z-index: 100;
        animation: clothes .3s linear infinite;
        &-i{
            position: absolute;
            left: 40px;
            width: 50px;
            height: 50px;
            background-color: $orange-1;
            border-radius: 30% 70% 70% 30% / 30% 30% 70% 70% ;
            &:nth-of-type(2){
                left: 20px;
                bottom: 0;
                border-radius: 24% 76% 45% 55% / 62% 30% 70% 38% ;
                background-color: $green-1;
            }
        }
    }
}
.s{
    animation: none;
    z-index: -100;
    &__shadow{
        transform: rotateX(-90deg) translateZ(50px) translateY(45px) translateX(25px) skewX(10deg);
        width: 225px;
        height: 300px;
        border-radius: 5px;
        background-color: $orange-2;
        animation: shadow .05s ease-in-out infinite alternate;
    }
}
/**/
@keyframes clothes {
    0%{
        transform-origin: left;
        transform: rotateZ(0);
    }
    100%{
        transform-origin: left;
        transform: rotateZ(1turn);
    }
}
@keyframes l {
    0%{
        transform-origin: top center;
        transform:
            perspective(2000px)
            rotate3d(-500,-1000, 100, 30deg)
            translateY(0)
            translateX(0)
            rotateZ(-3deg);
        ;
    }
    100%{
    transform-origin: top center;
        transform:
            perspective(2000px)
            rotate3d(-500,-1000, 0, 30deg)
            translateY(-10px)
            translateX(5px)
            rotateZ(5deg);
        ;
    }
}
@keyframes shadow {
    0%{
        width: 225px;
        height: 300px;
        transform:
            rotateX(-90deg)
            translateZ(50px)
            translateY(55px)
            translateX(25px)
            skewX(10deg)
        ;
    }
    100%{
        width: 226px;
        height: 302px;
        transform:
            rotateX(-90deg)
            translateZ(50px)
            translateY(55px)
            translateX(30px)
            skewX(15deg)
        ;
    }
}

              
            
!

JS

              
                /*
Designed by: Miguel E.
Original image: https://dribbble.com/shots/5878985-Laundry

*/
              
            
!
999px

Console