Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <style>
    .scale {
      animation: scale 2s;
    }
    @keyframes scale {
      from {
        transform: rotate(0deg);
        -webkit-transform: rotate(0deg);
      }
      
      to {
        transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
      }
      
    }
  </style>
  
</head>
<body>
  <span class="scale">Scale</span>
  <div id="log"></div>
  <script>
    addEventListener('load', function() {
      var style = document.querySelector('style');
      var log = document.getElementById('log');
      try {
        console.log(style.sheet.cssRules[1].cssText);
        log.textContent = 'Test: ok!';
      } catch(e) {
        log.textContent = 'Test: ' + e;
      }
    });
  </script>
 
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers