Skip to content

Instantly share code, notes, and snippets.

@qrg
Created June 26, 2015 03:40
Show Gist options
  • Select an option

  • Save qrg/e4d9b7ae9b680debe55c to your computer and use it in GitHub Desktop.

Select an option

Save qrg/e4d9b7ae9b680debe55c to your computer and use it in GitHub Desktop.
var css = '@keyframes pound {50% { transform: scale(1.4); }} .thechosenone {background-image: url("http://i.gyazo.com/8e5ca2b4889a1094fa1e71aa977eb4fe.png"); background-size:cover; animation: pound .25s ease}',
iframe = document.querySelector('iframe'),
head = iframe.contentDocument.head,
style = iframe.contentDocument.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
head.appendChild(style);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment