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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <h1>Full CSS<br/>Flat Animated Weather Icons</h1>
<h2>Made by <a target="_blank" href="https://antoine.cuffel.fr">Antoine Cuffel</a></h2>
<div class="center">
    <div class="weather sun">
        <div class="sun_form">
            <div></div>
            <div>
                <span></span>
            </div>
            <div>
                <span></span>
            </div>
            <div>
                <span></span>
            </div>
            <div>
                <span></span>
            </div>
            <div>
                <span></span>
            </div>
            <div>
                <span></span>
            </div>
            <div>
                <span></span>
            </div>
            <div>
                <span></span>
            </div>
        </div>
    </div>
    <div class="weather cloud">
        <div>
            <div class="cloud_form">
                <div></div>
                <div></div>
                <div></div>
                <div></div>
                <div></div>
            </div>
        </div>
        <div class="cloud_form">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
    <div class="weather storm">
        <div class="cloud_form">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
        <div class="storm_form">
            <div></div>
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
    </div>
    <div class="weather cloud_sun_rain">
        <div class="size_6">
            <div class="sun_form">
                <div></div>
                <div>
                    <span></span>
                </div>
                <div>
                    <span></span>
                </div>
                <div>
                    <span></span>
                </div>
                <div>
                    <span></span>
                </div>
                <div>
                    <span></span>
                </div>
                <div>
                    <span></span>
                </div>
                <div>
                    <span></span>
                </div>
                <div>
                    <span></span>
                </div>
            </div>
        </div>
        <div class="cloud_form">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
    </div>
    <div class="weather rain">
        <div class="cloud_form">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
        <div class="rain_form">
            <div></div>
        </div>
    </div>
    <div class="weather snow">
        <div class="cloud_form">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
        <div class="snow_form">
            <span></span>
        </div>
    </div>
</div>
              
            
!

CSS

              
                /* ######################################### */
/* ### VARIABLES ########################### */
/* ######################################### */

$color_yellow : #F4C800;
$color_grey : #5A5A5A;

/* ######################################### */
/* ### KEYFRAMES ########################### */
/* ######################################### */

/* SUN */

@include keyframes(sun_center_appear) {
    to{
		height : 50%;
		width : 50%;
		top : 25%;
		left : 25%;
	}
}

@include keyframes(sun_arrow_appear) {
    0%{
		top : 50%;
		opacity : 0;
	}
	50%{
		top : 50%;
		opacity : 0;
	}
	100%{
		opacity : 1;
		top : 20px;
	}
}

@include keyframes(sun_turn) {
    from{
        @include transform(rotate(0deg));
	}
	to{
        @include transform(rotate(360deg));
	}
}

/* CLOUD */

@include keyframes(cloud_appear) {
	to{
		opacity : 1;
	}
}

@include keyframes(cloud_moove) {
	0%{
		left : calc(100% - 100px);
		opacity : 0;
	}
	10%{
		left : calc(95% - 100px);
		opacity : 1;
	}
	90%{
		left : 5%;
		opacity : 1;
	}
	100%{
		left : 0%;
		opacity : 0;
	}
}

/* STORM */

@include keyframes(storm_d1_flash) {
	45% {
		border-color : transparent transparent $color_grey transparent;
	}
	50% {
		border-color : transparent transparent $color_yellow transparent;
	}
	55% {
		border-color : transparent transparent $color_grey transparent;
	}
}

@include keyframes(storm_d2_flash) {
	45% {
		border-color : $color_grey transparent transparent transparent;
	}
	50% {
		border-color : $color_yellow transparent transparent transparent;
	}
	55% {
		border-color : $color_grey transparent transparent transparent;
	}
}

/* RAIN */

@include keyframes(rain_fall) {
	0%{
		height : 0px;
		top : 0px;
	}
	20% {
		height : 40%;
		top : 0px;
	}
	80% {
		height : 40%;
		top : 70%
	}
	100% {
		height : 0px;
		top : 100%;
	}
}

/* SNOW */

@include keyframes(snow_fall) {
	0%{
		top : 0px;
		opacity : 0;
		left : 0px;
	}
	10%{
		top : 10%;
		opacity : 1;
		left : 5px;
	}
	20%{
		top : 20%;
		opacity : 1;
		left : 10px;
	}
	30%{
		top : 30%;
		opacity : 1;
		left : 4px;
	}
	40%{
		top : 40%;
		opacity : 1;
		left : 9px;
	}
	50%{
		top : 50%;
		opacity : 1;
		left : 6px;
	}
	60%{
		top : 60%;
		opacity : 1;
		left : 11px;
	}
	70%{
		top : 70%;
		opacity : 1;
		left : 3px;
	}
	80%{
		top : 80%;
		opacity : 1;
		left : 8px;
	}
	90%{
		top : 90%;
		opacity : 1;
		left : 5px;
	}
	100%{
		top : 100%;
		opacity : 0;
		left : 8px;
	}
}

/* ######################################### */
/* ### SCSS ################################ */
/* ######################################### */

html{
    background-color : #161616;
    font-family : Arial, sans-serif;
    
    body{
        margin : 0px;
        
        h1{
            margin-bottom : 0em;
            color : #fff;
            font-weight : 100;
            font-size : 2em;
            text-transform : uppercase;
            width : 100%;
            text-align : center;
        }
        h2{
            margin-top : 0px;
            margin-bottom : 2em;
            color : #fff;
            font-weight : 100;
            font-size : 1em;
            text-transform : uppercase;
            width : 100%;
            text-align : center;
            
            a{
                color : #fff;
            }
        }
        
        .center{
            margin-left : auto;
            margin-right : auto;
            display : table;
            position : relative;
            
            .weather{
                float : left;
                height : 200px;
                width : 200px;
                position : relative;
                overflow : hidden;
                
                .size_6{
                    @include transform(scale(0.6));
                }
                
                .sun_form{
                    height : 200px;
                    width : 200px;
                    @include animation(sun_turn 20s linear infinite);
                    @include animation-delay(0.7s);
                    
                    div{
                        &:nth-child(1){
                            height : 0px;
                            width : 0px;
                            @include border-radius(50%);
                            top : 50%;
                            left : 50%;
                            background-color : #F4C800;
                            position : absolute;
                            @include animation(sun_center_appear 0.5s linear forwards);
                        }
                        
                        &:not(:nth-child(1)){
                            background-color : transparent;
                            width : 100%;
                            height : 100%;
                            position : absolute;
                            top : 50%;
                            left : 50%;
                            margin-left : -50%;
                            margin-top : -50%;
                            
                            span{
                                background-color : transparent;
                                width : 0;
                                height : 0;
                                border-style : solid;
                                border-width : 0 7px 20px 7px;
                                border-color : transparent transparent #F4C800 transparent;
                                position : absolute;
                                top : 40px;
                                left : 95px;
                                opacity : 0;
                                @include animation(sun_arrow_appear 0.7s linear forwards);
                            }
                        }
                        
                        @for $i from 2 through 8{
                            &:nth-child(#{$i}){
                                @include transform(rotate(45deg * ($i - 1)));
                            }
                        }
                    }
                }
                
                &.cloud{
                    div:nth-child(1){
                        .cloud_form{
                            top : 20px;
                            position : absolute;
                            opacity : 1;
                            @include animation(cloud_moove 4s linear infinite);
                            -moz-transform: scale(0.5);
                            
                            div{
                                background-color : grey;
                                zoom : 0.5;
                                
                                &:after{
                                    background-color : grey;
                                }
                            }
                        }
                    }
                }
                
                .cloud_form{
                    opacity : 0;
                    @include animation(cloud_appear 0.5s linear forwards);
                    
                    div{
                        background-color : white;
                        position : absolute;
                        @include border-radius(50%);
                        
                        &:after{
                            content : "";
                            background-color : white;
                            position : absolute;
                            @include border-radius(50%);
                        }
                        
                        &:nth-child(1){
                            height : 60px;
                            width : 60px;
                            left : 5px;
                            top : 95px;
                            
                            &:after{
                                height : 40px;
                                width : 40px;
                                left : 150px;
                                top : 20px;
                            }
                        }
                        
                        &:nth-child(2){
                            height : 40px;
                            width : 140px;
                            left : 35px;
                            top : 115px;
                            
                            &:after{
                                height : 60px;
                                width : 60px;
                                left : 85px;
                                top : -30px;
                            }
                        }
                        
                        &:nth-child(3){
                            height : 100px;
                            width : 100px;
                            left : 35px;
                            top : 45px;
                            
                            &:after{
                                height : 60px;
                                width : 60px;
                                left : 70px;
                                top : 60px;
                            }
                        }
                    }
                }
                
                &.storm{
                    .cloud_form{
                        position : absolute;
                        top : -29px;
                    }
                    
                    .rain_form{
                        position : absolute;
                        
                        &:nth-child(3){
                            top : 126px;
                            left : 30px;
                        }
                        
                        &:nth-child(4){
                            top : 136px;
                            left : 40px;
                            
                            div{
                                @include animation-delay(0.2s);
                            }
                        }
                        
                        &:nth-child(5){
                            top : 126px;
                            left : 50px;
                            
                            div{
                                @include animation-delay(0.8s);
                            }
                        }
                        
                        &:nth-child(6){
                            top : 136px;
                            left : 60px;
                            
                            div{
                                @include animation-delay(0.1s);
                            }
                        }
                        
                        &:nth-child(7){
                            top : 126px;
                            left : 70px;
                            
                            div{
                                @include animation-delay(0.7s);
                            }
                        }
                        
                        &:nth-child(8){
                            top : 136px;
                            left : 80px;
                            
                            div{
                                @include animation-delay(0.1s);
                            }
                        }
                        
                        &:nth-child(9){
                            top : 126px;
                            left : 90px;
                            
                            div{
                                @include animation-delay(0.5s);
                            }
                        }
                        
                        &:nth-child(10){
                            top : 136px;
                            left : 100px;
                            
                            div{
                                @include animation-delay(0.3s);
                            }
                        }
                        
                        &:nth-child(11){
                            top : 126px;
                            left : 110px;
                            
                            div{
                                @include animation-delay(0.9s);
                            }
                        }
                        
                        &:nth-child(12){
                            top : 136px;
                            left : 120px;

                            div{
                                @include animation-delay(0.4s);
                            }
                        }
                    }
                    
                    .storm_form{
                        left : 140px;
                        top : 94px;
                        position : absolute;
                    }
                }
                
                .storm_form{
                    div{
                        width : 0;
                        height : 0;
                        border-style : solid;
                        position : absolute;
                        @include transform(rotate(10deg));
                        
                        &:nth-child(1){
                            border-width : 0 0 40px 20px;
                            border-color : transparent transparent #5A5A5A transparent;
                            left : 0px;
                            top : 0px;
                            @include animation(storm_d1_flash 2s linear infinite);
                        }
                        
                        &:nth-child(2){
                            border-width : 40px 20px 0 0;
                            border-color : #5A5A5A transparent transparent transparent;
                            left : 10px;
                            top : 30px;
                            @include animation(storm_d2_flash 2s linear infinite);
                        }
                    }
                }
                
                &.rain{
                    .cloud_form{
                        position : absolute;
                        top : -29px;
                    }
                    
                    .rain_form{
                        position : absolute;
                        
                        &:nth-child(2){
                            top : 126px;
                            left : 30px;
                        }
                        
                        &:nth-child(3){
                            top : 136px;
                            left : 120px;
                            
                            div{
                                @include animation-delay(0.4s);
                            }
                        }
                        
                        &:nth-child(4){
                            top : 136px;
                            left : 40px;
                            
                            div{
                                @include animation-delay(0.2s);
                            }
                        }
                        
                        &:nth-child(5){
                            top : 126px;
                            left : 50px;
                            
                            div{
                                @include animation-delay(0.8s);
                            }
                        }
                        
                        &:nth-child(6){
                            top : 136px;
                            left : 60px;
                            
                            div{
                                @include animation-delay(0.1s);
                            }
                        }
                        
                        &:nth-child(7){
                            top : 126px;
                            left : 70px;

                            div{
                                @include animation-delay(0.7s);
                            }
                        }
                        
                        &:nth-child(8){
                            top : 136px;
                            left : 80px;

                            div{
                                @include animation-delay(0.1s);
                            }
                        }
                        
                        &:nth-child(9){
                            top : 126px;
                            left : 90px;

                            div{
                                @include animation-delay(0.5s);
                            }
                        }
                        
                        &:nth-child(10){
                            top : 136px;
                            left : 100px;
                            
                            div{
                                @include animation-delay(0.3s);
                            }
                        }
                        
                        &:nth-child(11){
                            top : 126px;
                            left : 110px;

                            div{
                                @include animation-delay(0.9s);
                            }
                        }
                        
                        &:nth-child(12){
                            top : 136px;
                            left : 120px;

                            div{
                                @include animation-delay(0.6s);
                            }
                        }
                        
                        &:nth-child(13){
                            top : 126px;
                            left : 130px;

                            div{
                                @include animation-delay(0.2s);
                            }
                        }
                        
                        &:nth-child(14){
                            top : 136px;
                            left : 140px;

                            div{
                                @include animation-delay(0.1s);
                            }
                        }
                        
                        &:nth-child(15){
                            top : 126px;
                            left : 150px;

                            div{
                                @include animation-delay(0.9s);
                            }
                        }
                    }
                }
                
                .rain_form{
                    height : 50px;
                    width : 5px;
                    position : relative;
                    @include transform(rotate(30deg));
                    
                    div{
                        top : 0px;
                        left : 0px;
                        height : 0px;
                        width : 5px;
                        background-color : #078BD2;
                        @include border-radius(5px);
                        position : absolute;
                        @include animation(rain_fall 0.4s linear infinite);
                    }
                }
                
                &.cloud_sun_rain{
                    .sun_form{
                        left : 63px;
                        top : 16px;
                        position : absolute;
                    }
                    
                    .cloud_form{
                        zoom : 0.8;
                        -moz-transform : scale(0.8);
                        left : 28px;
                        top : 6px;
                        position : absolute;
                    }
                    
                    .rain_form{
                        position : absolute;
                        
                        &:nth-child(3){
                            top : 131px;
                            left : 63px;
                            
                            div{
                                -webkit-animation-delay : 0.1s;
                                animation-delay : 0.1s;
                            }
                        }
                        
                        &:nth-child(4){
                            top : 131px;
                            left : 88px;
                            
                            div{
                                -webkit-animation-delay : 0.2s;
                                animation-delay : 0.2s;
                            }
                        }
                        
                        &:nth-child(5){
                            top : 131px;
                            left : 112px;
                            
                            div{
                                -webkit-animation-delay : 0.8s;
                                animation-delay : 0.8s;
                            }
                        }
                    }
                }
                
                &.snow{
                    .cloud_form {
                        position : absolute;
                        top : -29px;
                    }
                    
                    .snow_form{
                        position : absolute;
                        
                        &:nth-child(2){
                            top : 126px;
                            left : 30px;
                        }
                        
                        &:nth-child(3){
                            top : 136px;
                            left : 120px;
                            
                            span{
                                @include animation-delay(0.4s);
                            }
                        }
                        
                        &:nth-child(4){
                            top : 136px;
                            left : 40px;
                            
                            span{
                                @include animation-delay(0.2s);
                            }
                        }
                        
                        &:nth-child(5){
                            top : 126px;
                            left : 50px;

                            span{
                                @include animation-delay(0.8s);
                            }
                        }
                        
                        &:nth-child(6){
                            top : 136px;
                            left : 60px;

                            span{
                                @include animation-delay(0.1s);
                            }
                        }
                        
                        &:nth-child(7){
                            top : 126px;
                            left : 70px;

                            span{
                                @include animation-delay(0.7s);
                            }
                        }
                        
                        &:nth-child(8){
                            top : 136px;
                            left : 80px;
                            
                            span{
                                @include animation-delay(0.1s);
                            }
                        }
                        
                        &:nth-child(9){
                            top : 126px;
                            left : 90px;
                            
                            span{
                                @include animation-delay(0.5s);
                            }
                        }
                        
                        &:nth-child(10){
                            top : 136px;
                            left : 100px;

                            span{
                                @include animation-delay(0.3s);
                            }
                        }
                        
                        &:nth-child(11){
                            top : 126px;
                            left : 110px;
                            
                            span{
                                @include animation-delay(0.9s);
                            }
                        }
                        
                        &:nth-child(12){
                            top : 136px;
                            left : 120px;
                            
                            span{
                                @include animation-delay(0.6s);
                            }
                        }
                        
                        &:nth-child(13){
                            top : 126px;
                            left : 130px;
                            
                            span{
                                @include animation-delay(0.2s);
                            }
                        }
                        
                        &:nth-child(14){
                            top : 136px;
                            left : 140px;
                            
                            span{
                                @include animation-delay(0.1s);
                            }
                        }
                        
                        &:nth-child(15){
                            top : 126px;
                            left : 150px;
                            
                            span{
                                @include animation-delay(0.9s);
                            }
                        }
                        
                        &:nth-child(16){
                            top : 126px;
                            left : 30px;

                            span{
                                @include animation-delay(1s);
                            }
                        }
                        
                        &:nth-child(17){
                            top : 136px;
                            left : 120px;

                            span{
                                @include animation-delay(1.4s);
                            }
                        }
                        
                        &:nth-child(18){
                            top : 136px;
                            left : 40px;

                            span{
                                @include animation-delay(1.2s);
                            }
                        }
                        
                        &:nth-child(19){
                            top : 126px;
                            left : 50px;

                            span{
                                @include animation-delay(1.8s);
                            }
                        }
                        
                        &:nth-child(20){
                            top : 136px;
                            left : 60px;

                            span{
                                @include animation-delay(1.1s);
                            }
                        }
                        
                        &:nth-child(21){
                            top : 126px;
                            left : 70px;

                            span{
                                @include animation-delay(1.7s);
                            }
                        }
                        
                        &:nth-child(22){
                            top : 136px;
                            left : 80px;

                            span{
                                @include animation-delay(1.1s);
                            }
                        }
                        
                        &:nth-child(23){
                            top : 126px;
                            left : 90px;
                            
                            span{
                                @include animation-delay(1.5s);
                            }
                        }
                        
                        &:nth-child(24){
                            top : 136px;
                            left : 100px;
                            
                            span{
                                @include animation-delay(1.3s);
                            }
                        }
                        
                        &:nth-child(25){
                            top : 126px;
                            left : 110px;
                            
                            span{
                                @include animation-delay(1.9s);
                            }
                        }
                        
                        &:nth-child(26){
                            top : 136px;
                            left : 120px;
                            
                            span{
                                @include animation-delay(1.6s);
                            }
                        }
                        
                        &:nth-child(27){
                            top : 126px;
                            left : 130px;
                            
                            span{
                                @include animation-delay(1.2s);
                            }
                        }
                        
                        &:nth-child(28){
                            top : 136px;
                            left : 140px;

                            span{
                                @include animation-delay(1.1s);
                            }
                        }
                        
                        &:nth-child(29){
                            top : 126px;
                            left : 150px;
                            
                            span{
                                @include animation-delay(1.9s);
                            }
                        }
                    }
                }
                
                .snow_form{
                    height : 50px;
                    width : 5px;
                    position : relative;
                    @include transform(rotate(30deg));
                    
                    span{
                        @include border-radius(50%);
                        background-color : white;
                        height : 5px;
                        width : 5px;
                        position : absolute;
                        @include animation(snow_fall 2s linear infinite);
                    }
                }
            }
        }
    }
}
              
            
!

JS

              
                /*

############### NO JS ###############

MADE BY :
- ANTOINE DUVAL

INSPIRED BY : 
- https://codepen.io/joshbader/pen/EjXgqr
- Google Weather Icons

LAST UPDATE :
- 15/06/2018

*/
              
            
!
999px

Console