Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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.bg
    div.sky
        div.txt Sierra National Forest
        div.forest
            div.forest__item
                div.forest__tree.forest__tree--1
                div.forest__tree.forest__tree--2
                div.forest__tree.forest__tree--3
                div.forest__tree.forest__tree--4
            div.forest__item
                div.forest__tree.forest__tree--1
                div.forest__tree.forest__tree--2
                div.forest__tree.forest__tree--3
                div.forest__tree.forest__tree--4
            div.forest__item
                div.forest__tree.forest__tree--1
                div.forest__tree.forest__tree--2
                div.forest__tree.forest__tree--3
                div.forest__tree.forest__tree--4
            div.forest__item
                div.forest__tree.forest__tree--1
                div.forest__tree.forest__tree--2
                div.forest__tree.forest__tree--3
                div.forest__tree.forest__tree--4
            div.forest__item
                div.forest__tree.forest__tree--1
                div.forest__tree.forest__tree--2
                div.forest__tree.forest__tree--3
                div.forest__tree.forest__tree--4
            div.forest__item
                div.forest__tree.forest__tree--1
                div.forest__tree.forest__tree--2
                div.forest__tree.forest__tree--3
                div.forest__tree.forest__tree--4
                    
        div.main
            div.tent
                div.tent__side
                div.tent__front
                    div.tent__door
            div.tree
                div.tree__item.tree__item--1
                div.tree__item.tree__item--2
        
            div.rock
                div.rock__item.rock__item--1
                div.rock__item.rock__item--2
                div.rock__item.rock__item--3
                
            div.cloud.cloud--1
                div.cloud__item
            div.cloud.cloud--2
                div.cloud__item
                    
            div.trunk
                div.trunk__item.trunk__item--1
                div.trunk__item.trunk__item--2
                div.trunk__item.trunk__item--3
                    
            div.fire
                //- div.fire__base
                //- div.fire__ax
                div.fire__item
                div.fire__trunk.fire__trunk--1
                div.fire__trunk.fire__trunk--2
                div.fire__light
                    
              
            
!

CSS

              
                /* Variables */
$purple-1: #C674D2;
$purple-2: #A857B6;
$purple-3: #953EA4;
$purple-4: #7D288E;
$purple-5: #560F63;
$purple-6: #390445;
$pink-1: #E52D73;
$pink-2: #CF0F5D;
$cloud: #FFFFFF;
$fire: #F75F96;

/* Reset */
*, *::after, *::before {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	user-select: none;
}
/* Generic */
body{
    width: 100%;
    height: 100vh;
    min-width: 560px;
    min-height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;


    font-family: 'Satisfy', cursive;
    font-size: 24px;
    background-color: $purple-6;
    color: $cloud;
}
.bg{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 800px;
    height: 600px;
}
.txt{
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    width: 560px;
    height: 260px;
    transform: translateY(-100%);
    transition: 2s linear;
    z-index: 2000;
}
.sky{
    position: relative;
    width: 560px;
    height: 260px;
    background-image: linear-gradient(
        to bottom,
        $purple-1 35%,
        $purple-2 35%,
        $purple-2 49%,
        $purple-3 49%
    );
    overflow: hidden;
    transition: 2s linear;

    &:hover{
        cursor: pointer;
        border-radius: 50px;
        transition: 2s linear;
        .main{
            filter: blur(7px);
            transform: scale(1.025);
        }
        .txt { transform: translateY(0%); }
    }
}
.forest{
    display: flex;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 120px;
    transition: 2s linear;

    &__item{
        display: flex;
        height: 100%;
        width: 100%;
        position: relative;
    }
    &__tree{
        position: absolute;
        width: 60px;
        border-bottom: 120px solid $purple-4;
        border-top: 0 solid transparent;
        border-left: 30px solid transparent;
        border-right: 30px solid transparent;

        &--1{ top: 12px; left: -25px; }
        &--2{ left: -5px; }
        &--3{ top: 25px; left: 20px; }
        &--4{ top: 40px; left: 45px; }
    }
}
.main{
    position: relative;
    width: 100%;
    height: 100%;
    transition: 2s linear;
    overflow: hidden;
}
.tent{
    position: absolute;
    bottom: 0;
    left: 90px;
    width: 300px;
    height: 170px;
    z-index: 100;

    &__side{
        position: absolute;
        right: 0;
        transform: skewX(30deg);
        width: 150px;
        height: 100%;
        background-color: $pink-1;
    }
    &__front{
        position: absolute;
        left: 0;
        bottom: 0;
        width: 60px;
        border-bottom: 170px solid $pink-2;
        border-top: 0 solid transparent;
        border-left: 101px solid transparent;
        border-right: 101px solid transparent;
    }
    &__door{
        position: absolute;
        top: 70px;
        left: -35px;
        width: 60px;
        border-bottom: 110px solid $purple-6;
        border-top: 0 solid transparent;
        border-left: 35px solid transparent;
        border-right: 35px solid transparent;
    }
}
.tree{
    &__item{
        position: absolute;
        &--1{
            bottom: -200px;
            width: 200px;
            height: 200px;
            transform: rotateZ(49deg) skewX(35deg) skewY(35deg);
            z-index: 150;
            background-image:
                linear-gradient(
                45deg ,
                $purple-6 50%,
                $purple-5 50%
            );
        }
        &--2{
            z-index: 50;
            right: 40px;
            bottom: 0;
            width: 60px;
            border-bottom: 260px solid $purple-6;
            border-top: 0 solid transparent;
            border-left: 70px solid transparent;
            border-right: 70px solid transparent;
        }
    }
}
.rock{
    &__item{
        position: absolute;
        left: 110px;
        bottom: -15px;
        height: 30px;
        width: 30px;
        border-radius: 50%;
        z-index: 200;
        background-color: $purple-6;
        &::before{
            content: '';
            position: absolute;
            left: 25px;
            bottom: 2px;
            height: 20px;
            width: 20px;
            border-radius: 50%;
            background-color: $purple-6;
        }

        &--2{ left: 10px; transform: rotateY(180deg);}
        &--3{ left: calc(100% - 40px); }
    }
}
.cloud{
    position: absolute;
    width: 100px;
    height: 25px;
    overflow: hidden;
    animation: cloud 4s infinite alternate;

    &--1{ top: 20px; left: 50px; animation-delay: .5s; }
    &--2{ top: 40px; left: calc(100% - 140px ); transform: rotateY(180deg); }
    &__item{
        position: relative;
        height: 50px;
        width: 50px;
        border-radius: 50%;
        background-color: $cloud;
        &::before{
            content: '';
            position: absolute;
            bottom: 5px;
            left: 35px;
            width: 35px;
            height: 35px;
            border-radius: 50%;
            background-color: $cloud;
        }
    }
}
.trunk{
    position: absolute;
    bottom: 0;
    left: 250px;
    width: 60px;
    height: 40px;
    z-index: 200;

    &__item{
        position: absolute;
        bottom: 0;
        width: 60px;
        height: 20px;
        border-radius: 30px;
        background-image:
            linear-gradient(
                to bottom,
                $purple-5 5%,
                $purple-4 ,
                $purple-6 30%
        );

        &::before{
            content: '';
            position: absolute;
            height: 20px;
            width: 20px;
            border-radius: 50%;
            background-image:
                radial-gradient(
                    circle ,
                    $purple-2 0%,
                    $purple-2 30%,
                    $purple-3 30%,
                    $purple-3 50%,
                    $purple-4 50%,
                    $purple-4 100%

                );
        }
        &--1{ left: 0; }
        &--2{ left: 20px; }
        &--3{ bottom: 20px;left: 10px; }
    }
}
.fire{
    height: 100px;
    width: 100px;
    position: absolute;
    bottom: -40px;
    right: 80px;
    z-index: 200;

    &__ax{
        position: absolute;
        top: 17px;
        left: -30px;
        width: 50px;
        height: 20px;
        transform: rotateZ(-15deg);
        border-top: 5px solid $purple-6;
        border-left: 5px solid transparent;
        background-image:
            linear-gradient(
                to right,
                $purple-2 40%,
                transparent 40%
            );
        z-index: -2;
    }

    &__base{
        position: absolute;
        bottom: 40px;
        left: -35px;
        width: 50px;
        border-bottom: 25px solid $purple-6;
        border-top: 20px solid transparent;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        z-index: -1;
    }
    &__item{
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        animation: opty 1s infinite alternate;

        &::before,
        &::after{
            content: '';
            position: absolute;
            width: 75%;
            height: 75%;
            border-radius: 50%;
            animation: opty 1s infinite alternate .1s;

        }
        &::after{ width: 50%; height: 50%;  animation-delay: .2s; }
    }
    &__trunk{
        position: absolute;
        bottom: 40px;
        width: 70px;
        height: 12px;
        border-radius: 2px;
        background-image:
            linear-gradient(
                to bottom,
                $purple-4,
                $purple-6 40%
        );
        &--1{ left: 20px; transform: rotateZ(-10deg); }
        &--2{ left: 20px; transform: rotateZ(15deg); }
    }
    &__light{
        height: 40px;
        width: 20px;
        background: $fire;
        position: absolute;
        bottom: 25px;
        left: calc(50% - 10px);
        border-radius: 50%;
        z-index: -1;
        animation: light .05s infinite alternate;

    }
}
/**/
@keyframes opty {
    0%{ background-color: rgba($cloud, .1);}
    100%{ background-color: rgba($cloud, .2);}
}
@keyframes light {
    0%{ left: calc(50% - 9px ); bottom: 25px; }
    100%{ left: calc(50% - 11px ); bottom: 24px; }
}
@keyframes cloud {
    0%{ transform: translateX(0); }
    100%{ transform: translateX(20px); }
}

              
            
!

JS

              
                /*
Designed by: Anthony Gribben
Original image: 
https://dribbble.com/shots/7806331-Nighttime-Camping-Illustration
*/
              
            
!
999px

Console