Despite the abundance of similar questions, none have quite addressed my specific query. I've created a preloader using CSS animation and I want it to synchronize perfectly with the page load. While I can trigger the animation on page load, I'm struggling to control its duration in order to match the exact timing of the page load, even if it's incredibly fast.
For reference, here is an example: http://jsfiddle.net/RgPU7/
I aim for the 'filling' effect to mirror the time taken for the page to load.
Currently, I am simply applying a delay and fadeout effect to the modal containing the CSS animation.
jQuery(window).load(function(){
$(".modal").delay(3000).fadeOut(1000);
});
Any suggestions or insights would be greatly appreciated. Thank you!