title: Bootstrap 3 img-responsive breaks after applying css rotate
body: <p>After rotating an image 90degrees inside an modal, the img-responsive is not working anymore. The image height goes beyond the modal height.</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>function rotate(){
      var angle = ($('#testImg').data('angle') + 90) || 90;
      $('#testImg').css({'transform': 'rotate(' + angle + 'deg)'});
      $('#testImg').data('angle', angle);
  }
  $(document).ready(function() {
      $('.modal').modal('show');
  })</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.modal {
    overflow-y: scroll;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;div class="modal fade" tabindex="-1" role="dialog"&gt;
    &lt;div class="modal-dialog modal-lg" role="document"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;h4 class="modal-title"&gt;Title&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          &lt;img id="testImg" class="img-responsive" src="http://wallpapercave.com/wp/LYiEQH6.jpg"&gt;
          &lt;button class="btn btn-primary" onclick="rotate()"&gt;&lt;/button&gt;
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>