I have a preload page with an animation.
<body onload="showSpinner()">
<h3>Please Wait...</h3>
<s开发者_StackOverflow中文版cript>
function showSpinner() {
showProgress();
window.location.href = 'Report.aspx';
}
</script>
</body>
When my function gets accessed and window.location.href fires, the animation freeze. Is there a way to prevent this?
There is no way to control the "freeze" in your animation.
The moment you are changing the location of the page, the browser fetches the new page and stops all processing of the current page, including animations. IIRC, this behaviour is not consistent across browsers.
精彩评论