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

              
                <!--
Credit to https://dribbble.com/shots/2350761-Weather-app-illustration for the design
-->

<div class="container">
  <div class="bg night_bg"></div>
  <div class="bg frosty_bg"></div>
  <div class="bg sunny_bg"></div>
  <div class="text_container">
    <div class="degrees"><span>&ordm;</span></div>
    <div class="place"></div>
    <div class="weather"></div>
  </div>
  <div class="circle_container">
    <div class="circle"></div>
    <div class="circle1"></div>
    <div class="circle2"></div>
    <div class="circle3"></div>
  </div>
  <div class="ground1 ground1_night"></div>
  <div class="ground1 ground1_frosty"></div>
  <div class="ground1 ground1_sunny"></div>
  <div class="ground2 ground2_night"></div>
  <div class="ground2 ground2_frosty"></div>
  <div class="ground2 ground2_sunny"></div>
</div>
              
            
!

CSS

              
                .container{
  width: 100%;
  max-width: 350px;
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.bg{
  position: absolute;
  z-index: 1;
  top: 0; left: 0; right: 0; bottom: 0;
}

.night_bg{
  background: #0F2129;
  background: -webkit-linear-gradient(#0F2129, #47334A); 
  background: -o-linear-gradient(#0F2129, #47334A); 
  background: -moz-linear-gradient(#0F2129, #47334A); 
  background: linear-gradient(#0F2129, #47334A);
}

.frosty_bg{
  background: #29386f;
  background: -webkit-linear-gradient(#29386f, #b8f5ff); 
  background: -o-linear-gradient(#29386f, #b8f5ff); 
  background: -moz-linear-gradient(#29386f, #b8f5ff); 
  background: linear-gradient(#29386f, #b8f5ff);
  opacity: 0;
  animation: frostyAnimation 20s ease infinite;
  -webkit-animation: frostyAnimation 20s linear infinite;
}

.sunny_bg{
  background: #ffbd3f;
  background: -webkit-linear-gradient(#ffbd3f, #fff097); 
  background: -o-linear-gradient(#ffbd3f, #fff097); 
  background: -moz-linear-gradient(#ffbd3f, #fff097); 
  background: linear-gradient(#ffbd3f, #fff097);
  opacity: 0;
  animation: sunnyAnimation 20s ease infinite;
  -webkit-animation: sunnyAnimation 20s linear infinite;
}
@keyframes frostyAnimation {
    32% { opacity: 0; }
    33% { opacity: 1; }
    62% { opacity: 1; }
    63% { opacity: 0; }
}

@-webkit-keyframes frostyAnimation {
    32% { opacity: 0; }
    33% { opacity: 1; }
    62% { opacity: 1; }
    63% { opacity: 0; }
}

@keyframes sunnyAnimation {
    62%{ opacity: 0; }
    63%{ opacity: 1; }
    99%{ opacity: 1; }
}

@-webkit-keyframes sunnyAnimation {
    62%{ opacity: 0; }
    63%{ opacity: 1; }
    99%{ opacity: 1; }
}

.text_container{
  margin-top: 50px;
  width: 100%;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  position: relative;
  z-index: 3;
}

.degrees{
  color: #4F787D;
  display: block;
  text-indent: -5px;
  font-size: 100px;
  font-weight: bold;
  position: relative;
  animation: degreesAnimation 20s ease infinite;
  -webkit-animation: degreesAnimation 20s linear infinite;
}

@keyframes degreesAnimation {
    32% { color: #4F787D; }
    33% { color: #a8ddff; }
    62% { color: #a8ddff; }
    63% { color: #fff5b8; }
    99% { color: #fff5b8; }
}

@-webkit-keyframes degreesAnimation {
    32% { color: #4F787D; }
    33% { color: #a8ddff; }
    62% { color: #a8ddff; }
    63% { color: #fff5b8; }
    99% { color: #fff5b8; }
}

.degrees::before{
  content: '+24';
  animation: degreesTextAnimation 20s ease infinite;
  -webkit-animation: degreesTextAnimation 20s linear infinite;
}

@keyframes degreesTextAnimation {
    32% { content: '+24';}
    33% { content: '-13'; }
    62% { content: '-13'; }
    63% { content: '+32'; }
    99% { content: '+32'; }
}

@-webkit-keyframes degreesTextAnimation {
    32% { content: '+24';}
    33% { content: '-13'; }
    62% { content: '-13'; }
    63% { content: '+32'; }
    99% { content: '+32'; }
}

.degrees span{
  font-size: 50px;
  position: absolute;
  top: 0;
}

.place{
  margin-bottom: 10px;
  text-transform: uppercase;
  color: #694c6d;
  animation: placeAnimation 20s ease infinite;
  -webkit-animation: placeAnimation 20s linear infinite;
}

@keyframes placeAnimation {
    32% { color: #694c6d; }
    33% { color: #4497bf; }
    62% { color: #4497bf; }
    63% { color: #f7a526; }
    99% { color: #f7a526; }
}

@-webkit-keyframes placeAnimation {
    32% { color: #694c6d; }
    33% { color: #4497bf; }
    62% { color: #4497bf; }
    63% { color: #f7a526; }
    99% { color: #f7a526; }
}

 .place::before{
  content: 'Madrid';
  animation: placeTextAnimation 20s ease infinite;
  -webkit-animation: placeTextAnimation 20s linear infinite;
}

@keyframes placeTextAnimation {
    32% { content: 'Madrid';}
    33% { content: 'Moscow'; }
    62% { content: 'Moscow'; }
    63% { content: 'Ankara'; }
    99% { content: 'Ankara'; }
}

@-webkit-keyframes placeTextAnimation {
    32% { content: 'Madrid';}
    33% { content: 'Moscow'; }
    62% { content: 'Moscow'; }
    63% { content: 'Ankara'; }
    99% { content: 'Ankara'; }
}

.weather{
  color: #FFF;
}

 .weather::before{
  content: 'Clear';
  animation: weatherTextAnimation 20s ease infinite;
  -webkit-animation: weatherTextAnimation 20s linear infinite;
}

@keyframes weatherTextAnimation {
    32% { content: 'Clear';}
    33% { content: 'Frosty'; }
    62% { content: 'Frosty'; }
    63% { content: 'Hot'; }
    99% { content: 'Hot'; }
}

@-webkit-keyframes weatherTextAnimation {
    32% { content: 'Clear';}
    33% { content: 'Frosty'; }
    62% { content: 'Frosty'; }
    63% { content: 'Hot'; }
    99% { content: 'Hot'; }
}

.circle_container{
  position: absolute;
  bottom: 200px;
  left: 100px;
  -webkit-animation: circleAnimation 20s linear infinite;
  animation: circleAnimation 20s ease infinite;
}

@-webkit-keyframes circleAnimation {
    32% {
       bottom: 200px;
       left: 100px;
    }
    33% {
       bottom: 150px;
       left: 200px;
    }
    62%{
       bottom: 150px;
       left: 200px;
    }
    63%{
       bottom: 400px;
       left: 250px;
    }
    99%{
       bottom: 400px;
       left: 250px;
    }
    100% {
       bottom: 200px;
       left: 100px;
    }
}
@keyframes circleAnimation {
    32% {
       bottom: 200px;
       left: 100px;
    }
    33% {
       bottom: 150px;
       left: 200px;
    }
    62%{
       bottom: 150px;
       left: 200px;
    }
    63%{
       bottom: 400px;
       left: 250px;
    }
    99%{
       bottom: 400px;
       left: 250px;
    }
    100% {
       bottom: 200px;
       left: 100px;
    }
}

.circle {
    position: relative;
    z-index: 7;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    -ms-box-shadow: 9px 9px 0 0 #BCAE76;
    -o-box-shadow: 9px 9px 0 0 #BCAE76;
    -webkit-box-shadow: 9px 9px 0 0 #BCAE76;
    box-shadow: 9px 9px 0 0 #BCAE76;
    -ms-transform: rotate(100deg);
    -webkit-transform: rotate(100deg);
    -o-transform: rotate(100deg);
    transform: rotate(100deg);
    animation: circleColor 20s ease infinite;
    -webkit-animation: circleColor 20s linear infinite;
}

@keyframes circleColor {
    32% {
       box-shadow: 9px 9px 0 0 #BCAE76;
       background: none;
       top: 0;
       left: 0;
    }
    33% {
       box-shadow: 0px 0px 0 0 #BCAE76;
       background-color: #feffdf;
       top: 10px;
       left: -15px;
    }
    62%{
       box-shadow: 0px 0px 0 0 #BCAE76;
       background-color: #feffdf;
       top: 10px;
       left: -15px;
    }
    63%{
       box-shadow: 0px 0px 0 0 #BCAE76;
       background-color: #ffdb50;
       top: 10px;
       left: -15px;
    }
    99%{
       box-shadow: 0px 0px 0 0 #BCAE76;
       background-color: #ffdb50;
       top: 10px;
       left: -15px;
    }
    100% {
       box-shadow: 9px 9px 0 0 #BCAE76;
    }
}

@-webkit-keyframes circleColor {
    32% {
       box-shadow: 9px 9px 0 0 #BCAE76;
       background: none;
       top: 0;
       left: 0;
    }
    33% {
       box-shadow: 0px 0px 0 0 #BCAE76;
       background-color: #feffdf;
       top: 10px;
       left: -15px;
    }
    62%{
       box-shadow: 0px 0px 0 0 #BCAE76;
       background-color: #feffdf;
       top: 10px;
       left: -15px;
    }
    63%{
       box-shadow: 0px 0px 0 0 #BCAE76;
       background-color: #ffdb50;
       top: 10px;
       left: -15px;
    }
    99%{
       box-shadow: 0px 0px 0 0 #BCAE76;
       background-color: #ffdb50;
       top: 10px;
       left: -15px;
    }
    100% {
       box-shadow: 9px 9px 0 0 #BCAE76;
    }
}

.circle1{
  content: '';
  background-color: #BCAE76;
  position: absolute;
  height: 90px;
  width: 90px;
  z-index: 6;
  border-radius: 50%;
  opacity: 0.1;
  top: -5px;
  left: -30px;
  animation: circle1Color 20s ease infinite;
  -webkit-animation: circle1Color 20s linear infinite;
}

@keyframes circle1Color {
    32%{ background: #BCAE76; }
    33%{ background: #feffdf; }
    62%{ background: #feffdf; }
    63%{ background: #ffdb50; }
    99%{ background: #ffdb50; }
   100%{ background: #BCAE76; }
}

@-webkit-keyframes circle1Color {
    32%{ background: #BCAE76; }
    33%{ background: #feffdf; }
    62%{ background: #feffdf; }
    63%{ background: #ffdb50; }
    99%{ background: #ffdb50; }
   100%{ background: #BCAE76; }
}

.circle2{
  background-color: #BCAE76;
  position: absolute;
  height: 110px;
  width: 110px;
  z-index: 6;
  border-radius: 50%;
  opacity: 0.1;
  top: -15px;
  left: -40px;
  animation: circle2Color 20s ease infinite;
  -webkit-animation: circle2Color 20s ease infinite;
}

@keyframes circle2Color {
    32%{ background: #BCAE76; }
    33%{ background: #feffdf; }
    62%{ background: #feffdf; }
    63%{ background: #ffdb50; }
    99%{ background: #ffdb50; }
   100%{ background: #BCAE76; }
}

@-webkit-keyframes circle2Color {
    32%{ background: #BCAE76; }
    33%{ background: #feffdf; }
    62%{ background: #feffdf; }
    63%{ background: #ffdb50; }
    99%{ background: #ffdb50; }
   100%{ background: #BCAE76; }
}

.circle3{
  background-color: #BCAE76;
  position: absolute;
  height: 130px;
  width: 130px;
  z-index: 6;
  border-radius: 50%;
  opacity: 0.1;
  top: -25px;
  left: -50px;
  animation: circle3Color 20s ease infinite;
  -webkit-animation: circle3Color 20s ease infinite;
}

@keyframes circle3Color {
    32%{ background: #BCAE76; }
    33%{ background: #feffdf; }
    62%{ background: #feffdf; }
    63%{ background: #ffdb50; }
    99%{ background: #ffdb50; }
   100%{ background: #BCAE76; }
}

@-webkit-keyframes circle3Color {
    32%{ background: #BCAE76; }
    33%{ background: #feffdf; }
    62%{ background: #feffdf; }
    63%{ background: #ffdb50; }
    99%{ background: #ffdb50; }
   100%{ background: #BCAE76; }
}


.ground1{
  width: 270px;
  height: 150px;
  border-top-left-radius: 100px;
  border-top-right-radius: 100px;
  position: absolute;
  z-index: 2;
  bottom: -50px;
  left: -20px;
  -ms-transform: rotate(20deg); /* IE 9 */
  -webkit-transform: rotate(20deg); /* Safari */
  transform: rotate(20deg);
}

.ground1_night{
  background: #2f2b3c; 
  background: -webkit-linear-gradient(#2f2b3c, #091B21); 
  background: -o-linear-gradient(#2f2b3c, #091B21); 
  background: -moz-linear-gradient(#2f2b3c, #091B21); 
  background: linear-gradient(#2f2b3c, #091B21);
  animation: nightGroundAnimation 20s ease infinite;
  -webkit-animation: nightGroundAnimation 20s ease infinite;
}

.ground1_frosty{
  background: #f3ffff; 
  background: -webkit-linear-gradient(#f3ffff, #9af2ff); 
  background: -o-linear-gradient(#f3ffff, #9af2ff); 
  background: -moz-linear-gradient(#f3ffff, #9af2ff); 
  background: linear-gradient(#f3ffff, #9af2ff);
  opacity: 0;
  animation: frostyGroundAnimation 20s ease infinite;
  -webkit-animation: frostyGroundAnimation 20s ease infinite;
}

.ground1_sunny{
  background: #e0d7a4; 
  background: -webkit-linear-gradient(#e0d7a4, #e7c77a); 
  background: -o-linear-gradient(#e0d7a4, #e7c77a); 
  background: -moz-linear-gradient(#e0d7a4, #e7c77a); 
  background: linear-gradient(#e0d7a4, #e7c77a);
  opacity: 0;
  animation: sunnyGroundAnimation 20s ease infinite;
  -webkit-animation: sunnyGroundAnimation 20s ease infinite;
}

.ground2{
  width: 500px;
  height: 150px;
  border-top-left-radius: 100px;
  border-top-right-radius: 100px;
  position: absolute;
  z-index: 2;
  bottom: -70px;
  right: -80px;
  -ms-transform: rotate(-10deg); /* IE 9 */
  -webkit-transform: rotate(-10deg); /* Safari */
  transform: rotate(-10deg);
}

.ground2_night{
  background: #2f2b3c; 
  background: -webkit-linear-gradient(#2f2b3c, #091B21); 
  background: -o-linear-gradient(#2f2b3c, #091B21); 
  background: -moz-linear-gradient(#2f2b3c, #091B21); 
  background: linear-gradient(#2f2b3c, #091B21);
  animation: nightGroundAnimation 20s ease infinite;
  -webkit-animation: nightGroundAnimation 20s ease infinite;
}

.ground2_frosty{
  background: #f3ffff; 
  background: -webkit-linear-gradient(#f3ffff, #9af2ff); 
  background: -o-linear-gradient(#f3ffff, #9af2ff); 
  background: -moz-linear-gradient(#f3ffff, #9af2ff); 
  background: linear-gradient(#f3ffff, #9af2ff);
  opacity: 0;
  animation: frostyGroundAnimation 20s ease infinite;
  -webkit-animation: frostyGroundAnimation 20s ease infinite;
}

.ground2_sunny{
  background: #e0d7a4; 
  background: -webkit-linear-gradient(#e0d7a4, #e7c77a); 
  background: -o-linear-gradient(#e0d7a4, #e7c77a); 
  background: -moz-linear-gradient(#e0d7a4, #e7c77a); 
  background: linear-gradient(#e0d7a4, #e7c77a);
  opacity: 0;
  animation: sunnyGroundAnimation 20s ease infinite;
  -webkit-animation: sunnyGroundAnimation 20s ease infinite;
}

@keyframes nightGroundAnimation {
    32% { opacity: 1; }
    33% { opacity: 0; }
    99% { opacity: 0; }
}

@-webkit-keyframes nightGroundAnimation {
    32% { opacity: 1; }
    33% { opacity: 0; }
    99% { opacity: 0; }
}

@keyframes frostyGroundAnimation {
    32% { opacity: 0; }
    33% { opacity: 1; }
    62% { opacity: 1; }
    63% { opacity: 0; }
}

@-webkit-keyframes frostyGroundAnimation {
    32% { opacity: 0; }
    33% { opacity: 1; }
    62% { opacity: 1; }
    63% { opacity: 0; }
}

@keyframes sunnyGroundAnimation {
    62%{ opacity: 0; }
    63%{ opacity: 1; }
    99%{ opacity: 1; }
}

@-webkit-keyframes sunnyGroundAnimation {
    62%{ opacity: 0; }
    63%{ opacity: 1; }
    99%{ opacity: 1; }
}
              
            
!

JS

              
                
              
            
!
999px

Console