Skip to content

Instantly share code, notes, and snippets.

@VincentVToscano
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VincentVToscano/d746d30918fed218d9ee to your computer and use it in GitHub Desktop.
Save VincentVToscano/d746d30918fed218d9ee to your computer and use it in GitHub Desktop.
Safari 6 - 7.1.3 SVG Background Redraw Fix
/**
* Vincent V. Toscano
* Safari redraw fix --- Must be placed after the element is available.
* Notes:
* 1. Solution to the issue where Safari will not show animated SVG sprite sheet used as a background image of element until
* until the user interacts with the page/element.
* 2. This has been tested on Safari 6 - 7.1.3
* 3. Adjust timing to suite your needs
* 4. Enact this technique only once for any element that will not show/present on screen.
*/
setTimeout(function(){document.body.style.padding='0px'},300);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment