title: Can I apply animations to margins?
body: <p>I'm trying to animate in CSS3 margins, which <a href="http://css3.bradshawenterprises.com/transitions/" rel="noreferrer">this site</a> seems to say you can, but I can't get working. </p>
  
  <p>I actually have 3 animations. 1 for a simple initial <code>fadeIn</code> on initial load, then the 2 others for the <code>margin</code> animation on click. I've also just tried <code>margin</code> instead of the top and bottom but still no sign of it working. </p>
  
  <p>Click on a section to see animation toggle.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".section").click(function() {
      $(this).toggleClass("open");
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body{
      background: #f1f1f1;
  }
  
  .section{
      display: block;
      background: #fff;
      border-bottom: 1px solid #f1f1f1;
      animation: fadeIn .5s ease, margin-top .5s ease, margin-bottom .5s ease;
  }
  .section.open {
      margin: 20px 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="wrapper"&gt;
      &lt;div class="section"&gt;Some content&lt;/div&gt;
      &lt;div class="section"&gt;Some content&lt;/div&gt;
      &lt;div class="section"&gt;Some content&lt;/div&gt;
      &lt;div class="section"&gt;Some content&lt;/div&gt;
      &lt;div class="section"&gt;Some content&lt;/div&gt;
      &lt;div class="section"&gt;Some content&lt;/div&gt;
      &lt;div class="section"&gt;Some content&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is a JSFiddle: <a href="http://jsfiddle.net/ybh0thp9/3/" rel="noreferrer">http://jsfiddle.net/ybh0thp9/3/</a> </p>