Is there a way to apply styles to an element upon or just before leaving that page and going to a different page?
For example, I have a fading out CSS3 Animation and I want to apply that right before a user leaves the current page to go to a different page in my site or to another page / site all together.
I appreciate and welcome all and any help or comments regarding this.
You'd need JS to do that, but it sounds like it might be pretty annoying, as you'd have to prevent the user from leaving the page for a while, which would probably make me never want to visit your site again, TBH.
yeah, i'm really glad @ralph.m bought me to my senses. I was really fascinated and obsessed with CSS3 Animations and wanted to do a fade-out upon leave, but when I realised that would prevent the user form reaching his / her goal ( in this case navigating to another page or leaving my site entirely ) I understood it was wrong of me to try to implement it and it would only make my visitors want to leave my site more.