G
G
geofran2019-08-19 19:11:07
JavaScript
geofran, 2019-08-19 19:11:07

How to postpone the transition by the link (closing the page) so that the transition animation has time to play?

There is a page loading animation and an animation of transition from one page to another, but the animation does not have time to play when moving from one page to another, because. the page closes early. How to wait for the animation to play and only after that go to another page?
https://codepen.io/iqholla/pen/WNeGGqv

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alekseyHunter, 2019-08-19
@geofran

You cannot delay the transition because the window is not modal.
And you didn't validate the HTML.

<!DOCTYPE html>
<html lang="ru" class="main">
<head>
  <meta charset="UTF-8">
  <title>Page Transition</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
</head>
<body>

<div> //Забыли добавить
  <a class="header" href="https://google.com"><h1>Click Me</h1></a></div>
<div class="cover enter"/> //Забыли закрыть

  <script src='https://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js'></script>

</body>
</html>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question