CSS transition property on page exit
问题 I need a few objects on my pages to animate out when a user clicks a link. I want each object to scale and fade out but not all objects such as the navigation buttons. I was thinking that upon a user clicking a link, the page delays 1 second before opening the redirecting the link to allow fade out giving the animation time to take effect. 回答1: Look at the JS event window.onbeforeunload https://developer.mozilla.org/en-US/docs/Web/API/window.onbeforeunload It will hopefully be enough to just