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

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

              
                <header class="bird-box">
  <div class="back-bird"></div>
  <div class="logo"></div>
  <div class="fore-bird"></div>
</header>
<section class="content">
  <article>
    <h1>Clothing Store</h1>
    <hr>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
      dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa.</p>
    <hr>
  </article>
  <div style="height: 2000px"></div>
</section>
              
            
!

CSS

              
                // Base Styles

body
  font-family: "Open Sans", sans-serif

h1
  color: #ccc
  weight: 300

figure
  margin: auto

.content
  article
    padding: 100px 0
    max-width: 640px
    margin: 0 auto
    text-align: center

img
  max-width: 100%



// Parallax
.bird-box
  position: relative
  height: 600px
  background:
    image: url(https://raw.githubusercontent.com/DevTips/Parallax-on-the-Web-DevTips-/master/images/bird-bg.jpg)
    size: auto 600px
    position: top center
    attachment: fixed
  overflow: hidden
 
.logo
  height: 100px
  width: 100%
  background:
    image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzc4LjA3IDc3LjA3IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAzNzguMDcgNzcuMDciIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTIyLjcxLDQyLjgzSDIuNjhWMC43MmgxOS41NWM4LjYsMCwxMy44OSw0LjI3LDEzLjg5LDEwLjg5djAuMTJjMCw0Ljc1LTIuNTMsNy40LTUuNTMsOS4wOA0KCQljNC44NywxLjg2LDcuODgsNC42OSw3Ljg4LDEwLjM1djAuMTJDMzguNDcsMzguOTgsMzIuMjIsNDIuODMsMjIuNzEsNDIuODN6IE0yNi45MiwxMy4xN2MwLTIuNzctMi4xNy00LjMzLTYuMDgtNC4zM0gxMS43djguOQ0KCQloOC41NGM0LjA5LDAsNi42OC0xLjMyLDYuNjgtNC40NVYxMy4xN3ogTTI5LjI3LDMwLjAyYzAtMi44My0yLjExLTQuNTctNi44Ni00LjU3SDExLjd2OS4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NjIuMTJ2MTQuN0gyMTF2LTE0LjdIMjEyLjY2eiIvPg0KCTxwYXRoIGQ9Ik0yMjkuMzgsNjIuMTJIMjMxdjE0LjdoLTEuMzJsLTkuNDktMTIuMDV2MTIuMDVoLTEuNjJ2LTE0LjdoMS41NWw5LjI2LDExLjc4VjYyLjEyeiIvPg0KCTxwYXRoIGQ9Ik0yNDMuNjEsNzcuMDdjLTQuNjIsMC03LjQ3LTMuMzYtNy40Ny03LjU4YzAtNC4wNSwyLjk2LTcuNjIsNy4zNy03LjYyYzIuNDgsMCw0LjAxLDAuNzEsNS40OCwxLjk1bC0xLjA3LDEuMjYNCgkJYy0xLjEzLTAuOTktMi4zOS0xLjY4LTQuNDctMS42OGMtMy4yNSwwLTUuNTgsMi43NS01LjU4LDYuMDVjMCwzLjUzLDIuMjUsNi4xMyw1LjgyLDYuMTNjMS42OCwwLDMuMjMtMC42NSw0LjI0LTEuNDd2LTMuNjVoLTQuNDcNCgkJdi0xLjQ5aDYuMDd2NS44NkMyNDguMTUsNzYuMDQsMjQ2LjA5LDc3LjA3LDI0My42MSw3Ny4wN3oiLz4NCjwvZz4NCjxnPg0KCTxyZWN0IHg9IjAiIHk9IjY4LjYzIiB3aWR0aD0iMTEyLjY1IiBoZWlnaHQ9IjEuNjgiLz4NCgk8cmVjdCB4PSIyNjUuNDIiIHk9IjY4LjYzIiB3aWR0aD0iMTEyLjY1IiBoZWlnaHQ9IjEuNjgiLz4NCjwvZz4NCjwvc3ZnPg0K)
    position: center
    repeat: no-repeat
  position: absolute
  top: 50%
  margin-top: -50px
 
.fore-bird
  width: 960px
  height: 733px
  background:
    //color: transparentize(pink,0.3)
    image: url(https://raw.githubusercontent.com/DevTips/Parallax-on-the-Web-DevTips-/master/images/fore-bird.png)
    repeat: no-repeat
    position: right bottom
  position: absolute
  left: 50%
  margin-left: -480px
  top: 380px
 
.back-bird
  width: 960px
  height: 298px
  background:
    image: url(https://raw.githubusercontent.com/DevTips/Parallax-on-the-Web-DevTips-/master/images/back-bird.png)
    repeat: no-repeat
    position: top left
  position: absolute
  left: 50%
  margin-left: -480px
  
  
              
            
!

JS

              
                $(window).scroll(function() {
  var wScroll = $(this).scrollTop();
  $(".logo").css({
    transform: "translate(0px, " + wScroll / 2 + "%)"
  });
  $(".back-bird").css({
    transform: "translate(0px, " + wScroll / 4 + "%)"
  });
   $('.fore-bird').css({
   'transform':'translate(0px, -'+ wScroll / 40 +'%)'
 });
});

              
            
!
999px

Console