CodePen

HTML

            
              <section class="main" id="main">
  <h1>Any content added to this page will fly in.</h1>
  
  <div class="module">
     <button id="add-sidebar-module">
       Add Sidebar Module
     </button>
     &emsp;
     <button id="add-article">
       Add Article
     </button>
  </div>
  
  <div class="module"><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit  amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p></div>

  <div class="module"><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p></div>
</section>

<aside class="sidebar" id="sidebar">
  <div class="module"><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p></div>
   <div class="module"><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p></div>
</aside>
            
          
!

CSS

            
              .module:not(.old-school) {
  animation: flyin 1.2s ease forwards;
  opacity: 0;
  transform: scale(2);
  
  /* SEE NOTE IN JAVASCRIPT */
  -webkit-filter: blur(4px);
}

@keyframes flyin {
   to { 
     -webkit-filter: blur(0);
     transform: scale(1);
     opacity: 1;
   }
}

* {
  @include box-sizing(border-box);
}
body {
  padding: 50px;
}
.main, .sidebar {
  padding: 1em;
}
.main {
  float: left;
  width: 70%;
}
.sidebar {
  float: right;
  width: 30%;
}
.module {
  border: 0.5em solid #ccc;
  background: #eee;
  padding: 1.5em;
  margin: 0 0 2em 0;
}
h1 {
  margin-top: 0;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              $(".module, h1").addClass("old-school");

$("#add-sidebar-module").on("click", function() {
  $("<div />", {
    class: "module",
    text: "I'm new here."
  }).prependTo("#sidebar");
});

$("#add-article").on("click", function() {
  $("<div />", {
    class: "module",
    html: "<h1>Title</h1><p>text text text.</p>"
  }).prependTo("#main");
});

/*
RE: -webkit-filter

Prefix free doesn't work with this property yet. It might in the future, if WebKit starts properly self-reporting support of it.

I'd use @include filter w/ Compass, but then the @keyframes have a bunch of prefixes in there they don't need.

Since WebKit is the only supporter right now anyway, might as well just prefix it straight up.

*/
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................