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

              
                <div class="container">
  <div class="day day1">
    <svg class="lines" xmlns="http://www.w3.org/2000/svg" width="300" height="115" viewBox="0 0 300 115">
      <path d="M0 66.6s69.5 29 92-3 53.1-49.3 75.1-24.1 54.2 36.9 76.4 21.4 30.1-26.3 56.5-20.1" />
    </svg>
    <div class="text">
      <span class="header tI">Today</span>
      <span class="temp tI">24&#176;F High</span>
      <p class="reg-text tI">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quam leo, fringilla sit amet diam ac, condimentum tristique nisi. Duis eleifend odio dui, et fermentum augue bibendum nec. Cras id sem at dolor tempor euismod.</p>
      <p class="snow tI">85% Chance of Snow</p>
    </div><!--text-->
  </div>
  <div class="day day2">
    <svg class="lines" xmlns="http://www.w3.org/2000/svg" width="300" height="115" viewBox="0 0 300 115">
      <path d="M0 30s79.3 68.6 112.3 51.5S163.8 9.1 195 32.4s77 33.3 105 18.7" />
    </svg>
    <div class="text">
      <span class="header tI">Tomorrow</span>
      <span class="temp tI">38&#176;F High</span>
      <p class="reg-text tI">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quam leo, fringilla sit amet diam ac, condimentum tristique nisi. Duis eleifend odio dui, et fermentum augue bibendum nec. Cras id sem at dolor tempor euismod.</p>
      <p class="snow tI">53% Chance of Snow</p>
    </div><!--text-->
  </div>
  <div class="day day3">
  <svg class="lines" xmlns="http://www.w3.org/2000/svg" width="300" height="115" viewBox="0 0 300 115">
      <path d="M0 56.3s49.5-38.2 68.7-11.9 65.9 43.6 90.8 19.8 42.6-12.7 48.2-10.7c9.2 3.3 52.2 33.7 72.1-5.1 9.8-19 20.2-5.4 20.2-5.4" />
    </svg>
    <div class="text">
      <span class="header tI">Day After</span>
      <span class="temp tI">34&#176;F High</span>
      <p class="reg-text tI">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quam leo, fringilla sit amet diam ac, condimentum tristique nisi. Duis eleifend odio dui, et fermentum augue bibendum nec. Cras id sem at dolor tempor euismod.</p>
      <p class="snow tI">74% Chance of Snow</p>
    </div><!--text-->
  </div>
</div>
<!--container-->
              
            
!

CSS

              
                $blue: #03aaee;
$secondary: #87728e;

body {
  background: black;
  font-family: 'Raleway';
  font-weight: 300;
}

.container {
  width: 880px;
  margin: 30px auto;
  display: table;
}

.header {
  color: $blue;
  font-size: 23px;
  display: inline;
}

.text {
  width: 80%;
  margin-left: 11%;
}

.temp {
  color: $secondary;
  font-size: 17px;
  margin-top: 4px;
  display: inline;
  float: right;
}

.reg-text {
  color: #fff;
  opacity: 0.7;
  font-size: 12px;
  line-height: 1.45;
}

.snow {
  margin-top: 26px;
  margin-left: 40px;
  color: $blue;
}

.day {
  width: 250px;
  height: 550px;
  position: absolute;
  background-size: cover;
}

@mixin accelerate($left) {
  transform: translate3d($left, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.lines {
  width: 250px;
  margin-top: 200px;
}

.lines path {
  stroke: $blue;
  fill: none;
}

.day1 {
  background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/iso-1.jpg");
  margin-right: 30px;
  @include accelerate(0px);
}

.day2 {
  background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/iso-2.jpg");
  margin-right: 30px;
  @include accelerate(310px);
}

.day3 {
  background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/iso-3.jpg");
  @include accelerate(620px);
}
              
            
!

JS

              
                var lines = $(".lines path");

TweenMax.set(lines, {
  drawSVG: "50% 50%"
});

TweenMax.to(lines, 1, {
  drawSVG: true,
  delay: 0.5,
  ease: Expo.easeOut
});

TweenMax.staggerFrom(".tI", 2.5, {
  opacity: 0,
  ease: Circ.easeOut
}, 0.1);

$(document).ready(function() {
  var day = $(".day");
  
  day.on("mouseenter", function(e) {
    e.preventDefault();
    var notDay = $(".day").not($(this));
    
    TweenMax.to($(this), 1, {
      scale: 1.1,
      transformOrigin: "50% 50%",
      ease: Circ.easeOut
    });
    TweenMax.to(notDay, 1, {
      opacity: 0.3,
      ease: Circ.easeOut
    });
  });
  
  day.on("mouseleave", function(e) {
    e.preventDefault();
    var notDay = $(".day").not($(this));
    
    TweenMax.to($(this), 1, {
      scale: 1,
      transformOrigin: "50% 50%",
      ease: Expo.easeOut
    });
    TweenMax.to(notDay, 1, {
      opacity: 1,
      ease: Circ.easeOut
    });
  });

});
              
            
!
999px

Console