cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              $grey: #dedede;
html, body {
  width: 100%;
  background-color: $grey;
}

#view  {
  position: absolute;
  left: 0;
  right: 0;
  top: 100px;
  margin: 0 auto;
  background-color: $grey;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
  z-index: 0;
}

#base {
  width: 280px;
  height: 70px;
  
  background-color: #fff;
  margin: auto;
  position: absolute;
  margin: 0 auto;
  left: 0;
  right: 0;
  top: 560px;
  z-index: 100;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}
            
          
!
            
              var paper  = Snap('#view');
var circle = paper.circle(250, 250, 250);
circle.attr({
  fill: "#114B7A"
});

var bigMountain = paper.polygon(0, 500, 350, 185, 650, 500);
bigMountain.attr({
  fill: "#F57C00"
});

var mountain = paper.polygon(-50, 500, 180, 275, 400, 500);
mountain.attr({
  fill: "#ffb74d"
});

var snow1 = paper.rect(350, 185, 40, 130);
var snow2 = paper.rect(350, 185, 90, 50);
var snow = paper.g(snow1, snow2);
snow1.transform('r48,350,185');
snow2.transform('r46,350,185');
snow.attr({
  fill: "#fff"
});

var circle1 = paper.circle(50, 350, 60);
var rect = paper.rect(50, 290, 200, 120);
var circle2 = paper.circle(250, 350, 60);
var circle3 = paper.circle(80, 300, 55);
var circle4 = paper.circle(180, 300, 90);

var f = paper.filter(Snap.filter.shadow(8, 8, 10, '#000', 0.5));

var cloud = paper.group(circle1, circle2, circle3, circle4, rect);
cloud.attr({
  fill: '#fff'
});

var smallCloud1 = cloud.clone().transform('t200 -170s0.2');
var smallCloud2 = cloud.clone().transform('t100 -100s0.2');
var mediumCloud = cloud.clone().transform('t250 -80s0.5');

cloud.attr({
  filter: f
});
mediumCloud.attr({
  filter: f
});

setInterval(function() {
  cloud.transform('t-400 0');
  cloud.animate({transform: 't600, 0'}, 20000);
}, 20000);

setInterval(function() {
  mediumCloud.transform('t-400 -80s0.5');
  mediumCloud.animate({transform: 't600 -80s0.5'}, 20000);
}, 25000);

setInterval(function() {
  smallCloud1.transform('t-300 -170s0.2');
  smallCloud1.animate({transform: 't400 -170s0.2'}, 15000);
  smallCloud2.transform('t-200 -100s0.2');
  smallCloud2.animate({transform: 't400 -100s0.2'}, 7500);
}, 15000);

            
          
!
999px
Loading ..................

Console