title: Different speeds for CSS transition
body: <p>I am using css transitions to animate the height of a div.  What I would like to do is have a slow transition in and a fast transition out.</p>
  
  <p>It is for a dropdown menu and although the drop down works great when you hover over a menu item initially, when you move along to the next item I want the previous dropdown to snap back almost immediately.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div {
    width: 100px;
    height: 100px;
    background: red;
    -webkit-transition: width 2s;
    /* For Safari 3.1 to 6.0 */
    transition: width 2s;
  }
  div:hover {
    width: 300px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;&lt;/div&gt;
  &lt;p&gt;Hover over the div element above, to see the transition effect.&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there a way to set a different duration for the in and out transitions?</p>