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 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.

Quick-add: + add another resource

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.

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.

            
              <div id="sky"></div>
<div id="ground-container">
  <div id="ground1"></div>
  <div id="ground2"></div>
  <div id="ground3"></div>
</div>
<div id="trees"></div>
<div id="leafsBG"></div>
<div class="raven sprite" id="raven"></div>
            
          
!
            
              body{
  margin:0;
  padding:0;
  overflow:hidden;
}
#sky {
  background: #000000;
  /* Old browsers */
  
  background: -moz-linear-gradient(left, #000000 0%, #ebf4cb 92%, #f9f9f2 100%);
  /* FF3.6+ */
  
  background: -webkit-gradient(linear, left top, right top, color-stop(0%, #000000), color-stop(92%, #ebf4cb), color-stop(100%, #f9f9f2));
  /* Chrome,Safari4+ */
  
  background: -webkit-linear-gradient(left, #000000 0%, #ebf4cb 92%, #f9f9f2 100%);
  /* Chrome10+,Safari5.1+ */
  
  background: -o-linear-gradient(left, #000000 0%, #ebf4cb 92%, #f9f9f2 100%);
  /* Opera 11.10+ */
  
  background: -ms-linear-gradient(left, #000000 0%, #ebf4cb 92%, #f9f9f2 100%);
  /* IE10+ */
  
  background: linear-gradient(to right, #000000 0%, #ebf4cb 92%, #f9f9f2 100%);
  /* W3C */
  
  filter: progid: DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#f9f9f2', GradientType=1);
  /* IE6-9 */
  
  width: 100%;
  height: 100%;
  display: block;
  position: fixed;
}

#ground1{
  width: 1024px;
  height: 351px;
  background: url("http://i221.photobucket.com/albums/dd22/djmid71/Ground_zpsy2gxhrsx.png");
  position: absolute;
  bottom: 0;
  left: 0;
  background-repeat: no-repeat;
}

#ground2{
  width: 1024px;
  height: 351px;
  background: url("http://i221.photobucket.com/albums/dd22/djmid71/Ground_zpsy2gxhrsx.png");
  position: absolute;
  bottom: 0;
  left: 1024px;
  background-repeat: no-repeat;
}

#ground3{
  width: 1024px;
  height: 351px;
  background: url("http://i221.photobucket.com/albums/dd22/djmid71/Ground_zpsy2gxhrsx.png");
  position: absolute;
  bottom: 0;
  left: 2048px;
  background-repeat: no-repeat;
}

#ground-container {
  position: absolute;
  width: 3072px;
  height: 351px;
  bottom: -165px;
  left:0;
  z-index: 8;
}

#leafsBG {
  width: 3840px;
  height: 952px;
  position: absolute;
  background: url("http://i221.photobucket.com/albums/dd22/djmid71/leafsBG_zpsrkvglqqu.png");
  background-repeat: repeat-x;
  left: 0;
  bottom: -260px;
  z-index: 2;
}

#bushes {
  width: 3840px;
  height: 292px;
  position: absolute;
  background: url("http://i221.photobucket.com/albums/dd22/djmid71/Lightened-Bushes_zpsywewqv3b.png");
  z-index: 5;
  left:0;
  bottom: 50px;
  background-repeat: repeat-x;
}

#trees {
  width: 4096px;
  background: url("http://i221.photobucket.com/albums/dd22/djmid71/trees_zps2wwdqnoh.png");
  background-repeat: repeat-x;
  position: absolute;
  height: 998px;
  bottom: -320px;
  z-index: 10;
}


/* raven */
.sprite {display:block; overflow:hidden; background-repeat: no-repeat;background-image:url("https://www.netgfx.com/trunk/games/raven.png");
position: absolute !important;z-index:100;width:205px; height:205px;bottom:100px !important;top: 50% !important;left: 100px !important;
}

.raven+texture0001 {width:205px; height:205px; background-position: -2px -2px}
.raven+texture0002 {width:205px; height:205px; background-position: -2px -209px}
.raven+texture0003 {width:205px; height:205px; background-position: -2px -416px}
.raven+texture0004 {width:205px; height:205px; background-position: -209px -2px}
.raven+texture0005 {width:205px; height:205px; background-position: -209px -209px}
.raven+texture0006 {width:205px; height:205px; background-position: -209px -416px}
.raven+texture0007 {width:205px; height:205px; background-position: -416px -2px}
.raven+texture0008 {width:205px; height:205px; background-position: -416px -209px}
.raven+texture0009 {width:205px; height:205px; background-position: -416px -416px}
.raven+texture0010 {width:205px; height:205px; background-position: -623px -2px}
.raven+texture0011 {width:205px; height:205px; background-position: -623px -209px}
.raven+texture0012 {width:205px; height:205px; background-position: -623px -416px}
.raven+texture0013 {width:205px; height:205px; background-position: -830px -2px}
.raven+texture0014 {width:205px; height:205px; background-position: -830px -209px}
.raven+texture0015 {width:205px; height:205px; background-position: -830px -416px}
.raven+texture0016 {width:205px; height:205px; background-position: -1037px -2px}
.raven+texture0017 {width:205px; height:205px; background-position: -1037px -209px}
.raven+texture0018 {width:205px; height:205px; background-position: -1037px -416px}
.raven+texture0019 {width:205px; height:205px; background-position: -1244px -2px}
.raven+texture0020 {width:205px; height:205px; background-position: -1244px -209px}
.raven+texture0021 {width:205px; height:205px; background-position: -1244px -416px}
.raven+texture0022 {width:205px; height:205px; background-position: -1451px -2px}
.raven+texture0023 {width:205px; height:205px; background-position: -1658px -2px}
.raven+texture0024 {width:205px; height:205px; background-position: -1451px -209px}
.raven+texture0025 {width:205px; height:205px; background-position: -1451px -416px}
            
          
!
            
              TweenMax.to($("#ground-container"), 3, {repeat:-1,left:-1024, ease: Linear.easeNone, onUpdate: function(){
  meter.tick();
}});
TweenMax.to($("#trees"), 900, {repeat:-1,backgroundPositionX:-2048, ease:Linear.easeNone});
TweenMax.to($("#leafsBG"), 2700, {repeat:-1,backgroundPositionX:-1920, ease:Linear.easeNone});

// raven animation

var values = [
  ["2px", "2px", "205px", "205px"],
  ["2px","209px", "205px", "205px"],
  ["2px", "416px", "205px", "205px"],
  ["209px", "209px", "205px", "205px"],
  ["209px", "416px", "205px", "205px"],
  ["416px", "2px", "205px", "205px"],
  ["416px", "209px", "205px", "205px"],
  ["416px", "416px", "205px", "205px"],
  ["623px", "2px", "205px", "205px"],
  ["623px", "209px", "205px", "205px"],
  ["623px", "416px", "205px", "205px"],
  ["830px", "2px", "205px", "205px"],
  ["830px", "209px", "205px", "205px"],
  ["830px", "416px", "205px", "205px"],
  ["1037px", "2px", "205px", "205px"],
  ["1037px", "209px", "205px", "205px"],
  ["1037px", "416px", "205px", "205px"],
  ["1244px", "2px", "205px", "205px"],
  ["1244px", "209px", "205px", "205px"],
  ["1244px", "416px", "205px", "205px"],
  ["1451px", "2px", "205px", "205px"],
  ["1658px", "2px", "205px", "205px"],
  ["1451px", "209px", "205px", "205px"],
  ["1451px", "416px", "205px", "205px"]
];

TweenMax.spriteSheet( document.getElementById("raven"), { original: ["205px", "205px"], data: values}, 1, { delay: 0, repeat: -1 });

meter = new FPSMeter();
            
          
!
999px
Loading ..................

Console