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="picture"></div>
<h1>Misty Background <br> Experiment</h1>
<div id="layer2"></div>
<div id="layer1"></div>
            
          
!
            
              //Dimensions
$height:100%;
$width:100%;

//Colors
$colorA: rgba(236, 240, 241,.6);
$colorB: rgba(236, 240, 241,.0);

@import url(https://fonts.googleapis.com/css?family=Roboto:700);

body{
  
//A lil layout  
font-family:'Roboto';
text-align:center;
  h1{
  font-size:50px;
  margin-top:200px;
  }//h1
  
  //Positioning the main divs
  div{
  background-size:200%;
  background-position:0 50%;
  height:$height;
  position:fixed;
  top:0;
  width:$width;
  pointer-events:none;
  }//div
  
#picture{
background-image:url('http://finda.photo/image/10216/thumbnail/original');
background-size:cover;
background-repeat:no-repeat;
z-index:-1;
}
  
  //Setting the first layer
  #layer1{
  background: repeating-linear-gradient(
  90deg,
  $colorB,
  $colorA,
  $colorB
            );
  animation: layer1 10s linear infinite alternate;
  }//#layer1
  
  //Setting the second layer
  #layer2{

  background: repeating-linear-gradient(
  90deg,
  $colorB,
  $colorA,
  $colorB
            );
  animation: layer2 15s linear infinite alternate;
  }//#layer2
  
  //Animations
  @keyframes layer1 {
    0% {background-position: 1000px 0;}
    50% {background-position: 500px 0;}
    100% {background-position: 0 0;}
  }//layer1
  @keyframes layer2 { 
    0% {background-position: 0 0%;}
    50% {background-position: 500px 0%;}
    100% {background-position: 1000px 0;}
  }//layer2
  
}//body
            
          
!
            
              // A pure CSS Experiment by
// Adrien Bachmann
// www.adrienbachmann.ch

// Feel free to fork/use it.
// Hit me if you do :D
// Cheers !!!
            
          
!
999px
Loading ..................

Console