Close Menu
Trendswave MediaTrendswave Media
  • Home
  • About Us
    • Contact Us
  • Services
  • Influencer Marketing
  • Marketing
  • SEO
  • Social Media
  • Web Design
  • Shop

Subscribe to Updates

Get the latest creative news from Trendswave about Marketing, SEO & Web Design.

Please enable JavaScript in your browser to complete this form.
Loading
What's Hot

Driving Qualified Leads With LinkedIn Content: A Proven Formula

October 3, 2025

Google Ads copywriting with AI: Getting the prompt right

October 3, 2025

A Practical Guide To Building With Clarity (Part 2) — Smashing Magazine

October 3, 2025
Facebook X (Twitter) Instagram
Trendswave MediaTrendswave Media
  • Home
  • About Us
    • Contact Us
  • Services
  • Influencer Marketing
  • Marketing
  • SEO
  • Social Media
  • Web Design
  • Shop
Trendswave MediaTrendswave Media
Home»Web Design»How to Build a JavaScript Page Loading Animation
Web Design

How to Build a JavaScript Page Loading Animation

adminBy adminFebruary 6, 2025No Comments7 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp VKontakte Email
How to Build a JavaScript Page Loading Animation
Share
Facebook Twitter LinkedIn Pinterest Email


To better understand what we’re going to build, check out the demo page. Be sure to click on the menu links to repeat the animation.

As both animations have similarities, I’ll borrow some content sections from the previous tutorial. This will help keep each tutorial detailed and independent. 

Page Animation Demo

For this tutorial our demo won’t live on CodePen. As we need different pages to showcase the animation, I decided that it’s better to host it on GitHub. Here’s the project structure:

1
panels-animation/
2
├── about.html
3
├── contact.html
4
├── index.html
5
├── main.css
6
└── main.js

Before we continue, it’s worth noting that the inspiration for this demo is taken from the rather lovely Nine Orchard’s website.

screenshot of the 9 orchards websitescreenshot of the 9 orchards websitescreenshot of the 9 orchards website

1. Begin With the Page Markup

Let’s describe the markup for the index.html page. This will be similar to the other pages.

Inside it, we’ll place:

  • A typical page header
  • The panels that will be responsible for splitting the screen into seven equal parts.
  • The main element where the page’s main content will live.

Additionally, we’ll import:

With all the above in mind, here’s the associated markup:

1

2
 lang="en">
3
  
4
     charset="utf-8">
5
     name="viewport" content="width=device-width, initial-scale=1">
6
     rel="preconnect" href="https://fonts.gstatic.com">
7
     rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap">
8
     rel="stylesheet" href="main.css">
9
    </span>Simple JavaScript Page Loading Animation<span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-10" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>10</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-11" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>11</pre>
</td>
<td class="rouge-code">
<pre>  
</pre>
</td>
</tr>
<tr id="line-12" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>12</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-13" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>13</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #f4bf75"><header> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"page-header"</span><span style="color: #f4bf75">></span>
</header></span></pre>
</td>
</tr>
<tr id="line-14" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>14</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"><nav/></span>
</pre>
</td>
</tr>
<tr id="line-15" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>15</pre>
</td>
<td class="rouge-code">
<pre>        <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-16" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>16</pre>
</td>
<td class="rouge-code">
<pre>          <span style="color: #f4bf75"><li/></span>
</pre>
</td>
</tr>
<tr id="line-17" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>17</pre>
</td>
<td class="rouge-code">
<pre>            <span style="color: #f4bf75"><a> <span style="color: #6a9fb5">href=</span><span style="color: #90a959">"index.html"</span><span style="color: #f4bf75">></span>Home<span style="color: #f4bf75"/></a></span>
</pre>
</td>
</tr>
<tr id="line-18" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>18</pre>
</td>
<td class="rouge-code">
<pre>          <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-19" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>19</pre>
</td>
<td class="rouge-code">
<pre>          <span style="color: #949494"><!-- more list items --></span>
</pre>
</td>
</tr>
<tr id="line-20" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>20</pre>
</td>
<td class="rouge-code">
<pre>        <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-21" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>21</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-22" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>22</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-23" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>23</pre>
</td>
<td class="rouge-code">
<pre>    
</pre>
</td>
</tr>
<tr id="line-24" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>24</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #f4bf75"/></pre>
</td>
</tr>
<tr id="line-25" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>25</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"><li> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"panel"</span> <span style="color: #6a9fb5">style=</span><span style="color: #90a959">"--index: 3"</span><span style="color: #f4bf75">></span></li></span>
</pre>
</td>
</tr>
<tr id="line-26" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>26</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"><li> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"panel"</span> <span style="color: #6a9fb5">style=</span><span style="color: #90a959">"--index: 2"</span><span style="color: #f4bf75">></span></li></span>
</pre>
</td>
</tr>
<tr id="line-27" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>27</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"><li> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"panel"</span> <span style="color: #6a9fb5">style=</span><span style="color: #90a959">"--index: 1"</span><span style="color: #f4bf75">></span></li></span>
</pre>
</td>
</tr>
<tr id="line-28" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>28</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"><li> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"panel"</span> <span style="color: #6a9fb5">style=</span><span style="color: #90a959">"--index: 0"</span><span style="color: #f4bf75">></span></li></span>
</pre>
</td>
</tr>
<tr id="line-29" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>29</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"><li> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"panel"</span> <span style="color: #6a9fb5">style=</span><span style="color: #90a959">"--index: 1"</span><span style="color: #f4bf75">></span></li></span>
</pre>
</td>
</tr>
<tr id="line-30" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>30</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"><li> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"panel"</span> <span style="color: #6a9fb5">style=</span><span style="color: #90a959">"--index: 2"</span><span style="color: #f4bf75">></span></li></span>
</pre>
</td>
</tr>
<tr id="line-31" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>31</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"><li> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"panel"</span> <span style="color: #6a9fb5">style=</span><span style="color: #90a959">"--index: 3"</span><span style="color: #f4bf75">></span></li></span>
</pre>
</td>
</tr>
<tr id="line-32" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>32</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-33" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>33</pre>
</td>
<td class="rouge-code">
<pre>    
</pre>
</td>
</tr>
<tr id="line-34" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>34</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #f4bf75"><main> <span style="color: #6a9fb5">class=</span><span style="color: #90a959">"page-main"</span><span style="color: #f4bf75">></span>
</main></span></pre>
</td>
</tr>
<tr id="line-35" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>35</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"/></pre>
</td>
</tr>
<tr id="line-36" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>36</pre>
</td>
<td class="rouge-code">
<pre>        <span style="color: #f4bf75"/>Home Page<span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-37" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>37</pre>
</td>
<td class="rouge-code">
<pre>        <span style="color: #949494"><!-- put more content here --></span>
</pre>
</td>
</tr>
<tr id="line-38" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>38</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-39" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>39</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-40" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>40</pre>
</td>
<td class="rouge-code">
<pre>    
</pre>
</td>
</tr>
<tr id="line-41" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>41</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #f4bf75"><script><![CDATA[<span style="color: #6a9fb5">src=]]></script></span><span style="color: #90a959">"main.js"</span><span style="color: #f4bf75">></span>   
</pre>
</td>
</tr>
<tr id="line-42" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>42</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #f4bf75"/>
</pre>
</td>
</tr>
<tr id="line-43" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>43</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75"/>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Consider the inline styles that we add to the panels. As we’ll see later, we’ll use the <code>index</code> CSS variable to animate them. The bigger the value, the more time it’ll take for the associated element to animate.</p>
<h2 id="toc-dodh-define-some-basic-styles">
<span class="sectionnum">2. </span>Define Some Basic Styles</h2>
<p>Next, we’ll continue with some CSS variables and reset styles:</p>
<div class="rouge-syntax-highlight">
<table class="rouge-line-table css">
<tbody>
<tr id="line-1" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>1</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0;background-color: #151515">:root</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-2" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>2</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">--panel-width</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">calc</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">100%</span> <span style="color: #d0d0d0">/</span> <span style="color: #90a959">7</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-3" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>3</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">--darkblue</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">#02020c</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-4" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>4</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">--white</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">#fff</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-5" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>5</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">--lightgray</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">#fafafb</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-6" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>6</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-7" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>7</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-8" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>8</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">*</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-9" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>9</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">padding</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">0</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-10" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>10</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">margin</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">0</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-11" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>11</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">box-sizing</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">border-box</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-12" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>12</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-13" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>13</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-14" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>14</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">ul</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-15" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>15</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">list-style</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">none</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-16" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>16</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-17" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>17</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-18" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>18</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">a</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-19" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>19</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">color</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">inherit</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-20" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>20</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">text-decoration</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">none</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-21" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>21</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-22" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>22</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-23" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>23</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">h1</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-24" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>24</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">font-size</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">3rem</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-25" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>25</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-26" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>26</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-27" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>27</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">body</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-28" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>28</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">height</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">100vh</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-29" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>29</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">font-family</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">"Montserrat"</span><span style="color: #d0d0d0">,</span> <span style="color: #d0d0d0;background-color: #151515">sans-serif</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-30" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>30</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">color</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--white</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-31" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>31</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">background</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--darkblue</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-32" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>32</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">overflow</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">hidden</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-33" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>33</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Three things to note:</p>
<ul>
</p>
<li>The <code>panel-width</code> variable will determine the panel width.</li>
<p>
</p>
<li>The page height will be equal to the viewport height.</li>
<p>
</p>
<li>We’ll hide any potential scrollbars that might appear depending on the amount of page content.</li>
<p>
</ul>
<h2 id="toc-8xam-specify-the-main-styles">
<span class="sectionnum">3. </span>Specify the Main Styles</h2>
<p>Let’s now concentrate on the <em>main</em> styles. We’ll leave out the header styles as they haven’t any importance.</p>
<div class="post__inarticle-ad-template">
<h3 id="toc-5q8l-the-panels">The Panels</h3>
<p><span>The panels will be fixed-positioned elements, and their </span><code>width</code> <span>and</span> <code>left</code> <span>property values will depend on the </span><code>panel-width</code> <span>variable. That said, the</span> <code>left</code> <span>value for the first panel will be 0, for the second one around 14.28%, for the third one around 28.5%, and so on. Their height will be equal to the viewport height and invisible by default. We’ll use the <code>clip-path</code> property to squeeze and move them to the bottom part of the page.</span></p>
<h3 id="toc-kr2k-main-element">Main Element</h3>
<p>The <code>main</code> element will be fullscreen with horizontally and vertically centered content. For simplicity, we’ll only put a heading and a link, but you can put anything you like. Again, by default, all this content will be invisible and sit 100px away from its original position. </p>
<p>Here are the relevant styles:</p>
<div class="rouge-syntax-highlight">
<table class="rouge-line-table css">
<tbody>
<tr id="line-1" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>1</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #949494">/*CUSTOM VARIABLES HERE*/</span>
</pre>
</td>
</tr>
<tr id="line-2" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>2</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-3" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>3</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-4" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>4</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">position</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">fixed</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-5" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>5</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">top</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">0</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-6" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>6</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">left</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">0</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-7" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>7</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">bottom</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">0</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-8" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>8</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">width</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">calc</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--panel-width</span><span style="color: #d0d0d0">)</span> <span style="color: #151515;background-color: #ac4142">+</span> <span style="color: #90a959">1px</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-9" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>9</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">clip-path</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">inset</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">100%</span> <span style="color: #90a959">0</span> <span style="color: #90a959">0</span> <span style="color: #90a959">0</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-10" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>10</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">background</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--lightgray</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-11" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>11</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">transition</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">all</span> <span style="color: #90a959">1s</span> <span style="color: #d0d0d0;background-color: #151515">cubic-bezier</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">0.25</span><span style="color: #d0d0d0">,</span> <span style="color: #90a959">1</span><span style="color: #d0d0d0">,</span> <span style="color: #90a959">0.25</span><span style="color: #d0d0d0">,</span> <span style="color: #90a959">1</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-12" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>12</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-13" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>13</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-14" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>14</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span><span style="color: #d0d0d0;background-color: #151515">:nth-child</span><span style="color: #d0d0d0">(</span><span style="color: #151515;background-color: #ac4142">2</span><span style="color: #d0d0d0">)</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-15" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>15</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">left</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--panel-width</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-16" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>16</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-17" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>17</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-18" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>18</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span><span style="color: #d0d0d0;background-color: #151515">:nth-child</span><span style="color: #d0d0d0">(</span><span style="color: #151515;background-color: #ac4142">3</span><span style="color: #d0d0d0">)</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-19" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>19</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">left</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">calc</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--panel-width</span><span style="color: #d0d0d0">)</span> <span style="color: #151515;background-color: #ac4142">*</span> <span style="color: #90a959">2</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-20" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>20</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-21" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>21</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-22" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>22</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span><span style="color: #d0d0d0;background-color: #151515">:nth-child</span><span style="color: #d0d0d0">(</span><span style="color: #151515;background-color: #ac4142">4</span><span style="color: #d0d0d0">)</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-23" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>23</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">left</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">calc</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--panel-width</span><span style="color: #d0d0d0">)</span> <span style="color: #151515;background-color: #ac4142">*</span> <span style="color: #90a959">3</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-24" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>24</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-25" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>25</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-26" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>26</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span><span style="color: #d0d0d0;background-color: #151515">:nth-child</span><span style="color: #d0d0d0">(</span><span style="color: #151515;background-color: #ac4142">5</span><span style="color: #d0d0d0">)</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-27" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>27</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">left</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">calc</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--panel-width</span><span style="color: #d0d0d0">)</span> <span style="color: #151515;background-color: #ac4142">*</span> <span style="color: #90a959">4</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-28" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>28</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-29" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>29</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-30" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>30</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span><span style="color: #d0d0d0;background-color: #151515">:nth-child</span><span style="color: #d0d0d0">(</span><span style="color: #151515;background-color: #ac4142">6</span><span style="color: #d0d0d0">)</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-31" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>31</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">left</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">calc</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--panel-width</span><span style="color: #d0d0d0">)</span> <span style="color: #151515;background-color: #ac4142">*</span> <span style="color: #90a959">5</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-32" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>32</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-33" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>33</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-34" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>34</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span><span style="color: #d0d0d0;background-color: #151515">:nth-child</span><span style="color: #d0d0d0">(</span><span style="color: #151515;background-color: #ac4142">7</span><span style="color: #d0d0d0">)</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-35" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>35</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">left</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">calc</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--panel-width</span><span style="color: #d0d0d0">)</span> <span style="color: #151515;background-color: #ac4142">*</span> <span style="color: #90a959">6</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-36" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>36</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-37" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>37</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-38" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>38</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.page-main</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-39" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>39</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">display</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">flex</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-40" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>40</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">height</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">100%</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-41" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>41</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">padding</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">100px</span> <span style="color: #90a959">15px</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-42" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>42</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">overflow-y</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">auto</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-43" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>43</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-44" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>44</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-45" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>45</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.page-main</span> <span style="color: #d0d0d0">></span> <span style="color: #f4bf75">div</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-46" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>46</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">text-align</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">center</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-47" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>47</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">margin</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">auto</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-48" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>48</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-49" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>49</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-50" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>50</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.page-main</span> <span style="color: #d0d0d0">></span> <span style="color: #f4bf75">div</span> <span style="color: #d0d0d0">></span> <span style="color: #d0d0d0">*</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-51" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>51</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">opacity</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">0</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-52" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>52</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">transition</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">all</span> <span style="color: #90a959">0.5s</span> <span style="color: #d0d0d0;background-color: #151515">ease-out</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-53" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>53</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-54" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>54</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-55" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>55</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.page-main</span> <span style="color: #f4bf75">h1</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-56" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>56</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">transform</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">translateY</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">-100px</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-57" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>57</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-58" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>58</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-59" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>59</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.page-main</span> <span style="color: #f4bf75">p</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-60" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>60</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">font-size</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">20px</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-61" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>61</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">margin-top</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">20px</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-62" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>62</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">transform</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">translateY</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">100px</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-63" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>63</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="callout-block">
<span class="callout-icon callout-info"/></p>
<div>
<p>info</p>
<p>
<span>if you check the <code>width</code></span> <span>value of the panels, you’ll notice there’s an extra pixel</span><span>. Its job is to make the panels overlap a little bit, and thus prevent the blue borders (their color will depend on the page color) between the adjacent panels. </span> </p>
</div>
</div>
<figure class="post_image"><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=850/uploads/users/780/posts/93911/image-upload/borders.png" alt="The blue lines that appear between the panels" loading="lazy" width="870px" height="472px" class="resized-image resized-image-desktop" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=1700/uploads/users/780/posts/93911/image-upload/borders.png 2x"/><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=630/uploads/users/780/posts/93911/image-upload/borders.png" alt="The blue lines that appear between the panels" loading="lazy" width="650px" height="355px" class="resized-image resized-image-tablet" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=1260/uploads/users/780/posts/93911/image-upload/borders.png 2x"/><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=360/uploads/users/780/posts/93911/image-upload/borders.png" alt="The blue lines that appear between the panels" loading="lazy" width="380px" height="211px" class="resized-image resized-image-mobile" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=720/uploads/users/780/posts/93911/image-upload/borders.png 2x"/></figure>
</div>
<h2 id="toc-99mk-fire-the-animations">
<span class="sectionnum">4.</span> Fire the Animations</h2>
<p><span>When the page loads, the following animations have to play in this order:</span></p>
<ol>
</p>
<li>First, the panels should appear from bottom to top.</li>
<p>
</p>
<li>Then, the panels should disappear and move to the top.</li>
<p>
</p>
<li>Finally, all page contents should become visible.</li>
<p>
</ol>
<p>During the first two steps, the panels will be transitioned with some delay. As we’ve discussed before, this will depend on the value of their <code>index</code> variable.</p>
<h3 id="toc-v51j-mimic-a-timeline">Mimic a Timeline</h3>
<p>To create<span> a sequence of tweens as we did the last time with <a rel="nofollow noopener" target="_blank" href="https://greensock.com/docs/v3/GSAP/Timeline">GSAP’s Timeline</a>, we’ll t</span>ake advantage of a lesser-known event called <code><a rel="nofollow noopener" target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionend_event">transitionend</a></code>. This event fires each time a CSS transition finishes and gives us the ability to synchronize animations.</p>
<p>Of course, we aren’t interested in all transitions, instead, we only care about the panels’ transitions and specifically the transitions of the last animated panel. In our case, the last animated panels will be the first and seventh (last) ones as both have <code>index: 3</code>. </p>
<figure class="post_image"><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=850/uploads/users/780/posts/93911/image-upload/transition_delay.png" alt="The transition delay of the last panel" loading="lazy" width="870px" height="273px" class="resized-image resized-image-desktop" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=1700/uploads/users/780/posts/93911/image-upload/transition_delay.png 2x"/><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=630/uploads/users/780/posts/93911/image-upload/transition_delay.png" alt="The transition delay of the last panel" loading="lazy" width="650px" height="208px" class="resized-image resized-image-tablet" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=1260/uploads/users/780/posts/93911/image-upload/transition_delay.png 2x"/><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=360/uploads/users/780/posts/93911/image-upload/transition_delay.png" alt="The transition delay of the last panel" loading="lazy" width="380px" height="127px" class="resized-image resized-image-mobile" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=720/uploads/users/780/posts/93911/image-upload/transition_delay.png 2x"/></figure>
<p>As you’ll see in the code, we’ll work with the last one, but we could equally have used the first one. To better understand it, try to give the selected panel a large delay of around 1s and see how the animations get out of sync.</p>
<p>In terms of the code logic, we’ll do the following things in this order:</p>
<ol>
</p>
<li>First, when the page loads, we’ll add the <code>loaded</code> class to the <code>body</code>.</li>
<p>
</p>
<li>Then, we’ll wait till the transition of the last panel finishes<span>—this </span>will fire twice in total. At that point, we’ll add another class to the <code>body</code>. The first time we’ll add the <code>second-round</code> class, while the second time, we’ll add the <code>third-round</code>.</li>
<p>
</ol>
<p>After the completion of our transitions, the <code>body</code> will have these classes:</p>
<figure class="post_image"><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=850/uploads/users/780/posts/93911/image-upload/body_classes.png" alt="The classes attached to the body" loading="lazy" width="870px" height="269px" class="resized-image resized-image-desktop" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=1700/uploads/users/780/posts/93911/image-upload/body_classes.png 2x"/><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=630/uploads/users/780/posts/93911/image-upload/body_classes.png" alt="The classes attached to the body" loading="lazy" width="650px" height="205px" class="resized-image resized-image-tablet" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=1260/uploads/users/780/posts/93911/image-upload/body_classes.png 2x"/><img decoding="async" src="https://cms-assets.tutsplus.com/cdn-cgi/image/width=360/uploads/users/780/posts/93911/image-upload/body_classes.png" alt="The classes attached to the body" loading="lazy" width="380px" height="125px" class="resized-image resized-image-mobile" srcset="https://cms-assets.tutsplus.com/cdn-cgi/image/width=720/uploads/users/780/posts/93911/image-upload/body_classes.png 2x"/></figure>
<p>Here’s the JavaScript code:</p>
<div class="rouge-syntax-highlight">
<table class="rouge-line-table javascript">
<tbody>
<tr id="line-1" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>1</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d28445">const</span> <span style="color: #d0d0d0;background-color: #151515">body</span> <span style="color: #d0d0d0">=</span> <span style="color: #d0d0d0;background-color: #151515">document</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">body</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-2" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>2</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d28445">const</span> <span style="color: #d0d0d0;background-color: #151515">lastPanel</span> <span style="color: #d0d0d0">=</span> <span style="color: #d0d0d0;background-color: #151515">document</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">querySelector</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">"</span><span style="color: #90a959">.panels .panel:last-child</span><span style="color: #90a959">"</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-3" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>3</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-4" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>4</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0;background-color: #151515">window</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">addEventListener</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">"</span><span style="color: #90a959">load</span><span style="color: #90a959">"</span><span style="color: #d0d0d0">,</span> <span style="color: #d0d0d0">()</span> <span style="color: #d0d0d0">=></span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-5" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>5</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">body</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">classList</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">add</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">"</span><span style="color: #90a959">loaded</span><span style="color: #90a959">"</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-6" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>6</pre>
</td>
<td class="rouge-code">
<pre>  
</pre>
</td>
</tr>
<tr id="line-7" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>7</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">lastPanel</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">addEventListener</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">"</span><span style="color: #90a959">transitionend</span><span style="color: #90a959">"</span><span style="color: #d0d0d0">,</span> <span style="color: #d0d0d0">()</span> <span style="color: #d0d0d0">=></span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-8" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>8</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #aa759f">if</span> <span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">body</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">classList</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">contains</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">"</span><span style="color: #90a959">second-round</span><span style="color: #90a959">"</span><span style="color: #d0d0d0">))</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-9" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>9</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #d0d0d0;background-color: #151515">body</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">classList</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">add</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">"</span><span style="color: #90a959">third-round</span><span style="color: #90a959">"</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-10" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>10</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #d0d0d0">}</span> <span style="color: #aa759f">else</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-11" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>11</pre>
</td>
<td class="rouge-code">
<pre>      <span style="color: #d0d0d0;background-color: #151515">body</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">classList</span><span style="color: #d0d0d0">.</span><span style="color: #d0d0d0;background-color: #151515">add</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">"</span><span style="color: #90a959">second-round</span><span style="color: #90a959">"</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-12" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>12</pre>
</td>
<td class="rouge-code">
<pre>    <span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-13" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>13</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0">});</span>
</pre>
</td>
</tr>
<tr id="line-14" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>14</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">});</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="callout-block">
<span class="callout-icon callout-tip"/></p>
<p>Instead of the <code>load</code> event, we could have used the <code>DOMContentLoaded</code> event.</p>
</div>
<p>And the corresponding styles:</p>
<div class="rouge-syntax-highlight">
<table class="rouge-line-table css">
<tbody>
<tr id="line-1" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>1</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.loaded</span> <span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-2" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>2</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">clip-path</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">inset</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">0</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-3" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>3</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">transition-delay</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">calc</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">var</span><span style="color: #d0d0d0">(</span><span style="color: #d0d0d0;background-color: #151515">--index</span><span style="color: #d0d0d0">)</span> <span style="color: #151515;background-color: #ac4142">*</span> <span style="color: #90a959">0.06s</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-4" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>4</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-5" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>5</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-6" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>6</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.loaded.second-round</span> <span style="color: #f4bf75">.panels</span> <span style="color: #f4bf75">.panel</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-7" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>7</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">clip-path</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">inset</span><span style="color: #d0d0d0">(</span><span style="color: #90a959">0</span> <span style="color: #90a959">0</span> <span style="color: #90a959">100%</span> <span style="color: #90a959">0</span><span style="color: #d0d0d0">);</span>
</pre>
</td>
</tr>
<tr id="line-8" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>8</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-9" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>9</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-10" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>10</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.loaded.third-round</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-11" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>11</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">overflow</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">auto</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-12" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>12</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
<tr id="line-13" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>13</pre>
</td>
<td class="rouge-code">
<pre>
</pre>
</td>
</tr>
<tr id="line-14" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>14</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #f4bf75">.loaded.third-round</span> <span style="color: #f4bf75">.page-main</span> <span style="color: #d0d0d0">></span> <span style="color: #f4bf75">div</span> <span style="color: #d0d0d0">></span> <span style="color: #d0d0d0">*</span> <span style="color: #d0d0d0">{</span>
</pre>
</td>
</tr>
<tr id="line-15" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>15</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">opacity</span><span style="color: #d0d0d0">:</span> <span style="color: #90a959">1</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-16" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>16</pre>
</td>
<td class="rouge-code">
<pre>  <span style="color: #d0d0d0;background-color: #151515">transform</span><span style="color: #d0d0d0">:</span> <span style="color: #d0d0d0;background-color: #151515">none</span><span style="color: #d0d0d0">;</span>
</pre>
</td>
</tr>
<tr id="line-17" class="lineno">
<td class="rouge-gutter gl" style="-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;">
<pre>17</pre>
</td>
<td class="rouge-code">
<pre><span style="color: #d0d0d0">}</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h2 id="toc-xpfz-conclusion">Conclusion</h2>
<p>Congrats, folks! We managed to build an attractive <a rel="nofollow noopener" target="_blank" href="https://tutsplus.github.io/simple-panels-animation/">JavaScript page loading animation</a> by staggering animations thanks to the <code>transitionend</code> event. Obviously, for more heavy use of animations, a library like GSAP is a more robust approach to follow. Feel free to extend the demo as you wish and share it with me!</p>
<p>As always, thanks a lot for reading!</p>
<h2 id="toc-q6u2-learn-css-with-these-projects">More Projects to Practice</h2>
<p><span>Take a look at these projects on Tuts+ that use the <code>clip-path</code> property to apply different kinds of animations.</span></p>
</div>
<p><br />
<br /><a href="https://webdesign.tutsplus.com/how-to-build-a-javascript-page-loading-animation--cms-93911t" target="_blank" rel="noopener">Source link </a></p>

				
		
		
		
	</div>
</div>
	
	<div class="the-post-tags"><a href="https://trendswave.net/tag/animation/" rel="tag">Animation</a> <a href="https://trendswave.net/tag/build/" rel="tag">Build</a> <a href="https://trendswave.net/tag/javascript/" rel="tag">JavaScript</a> <a href="https://trendswave.net/tag/loading/" rel="tag">Loading</a> <a href="https://trendswave.net/tag/page/" rel="tag">page</a></div>
			</article>

			
	
	<div class="post-share-bot">
		<span class="info">Share.</span>
		
		<span class="share-links spc-social spc-social-colors spc-social-bg">

			
			
				<a href="https://www.facebook.com/sharer.php?u=https%3A%2F%2Ftrendswave.net%2Fweb-design%2Fhow-to-build-a-javascript-page-loading-animation%2F" class="service s-facebook tsi tsi-facebook" 
					title="Share on Facebook" target="_blank" rel="nofollow noopener">
					<span class="visuallyhidden">Facebook</span>

									</a>
					
			
				<a href="https://twitter.com/intent/tweet?url=https%3A%2F%2Ftrendswave.net%2Fweb-design%2Fhow-to-build-a-javascript-page-loading-animation%2F&text=How%20to%20Build%20a%20JavaScript%20Page%20Loading%20Animation" class="service s-twitter tsi tsi-twitter" 
					title="Share on X (Twitter)" target="_blank" rel="nofollow noopener">
					<span class="visuallyhidden">Twitter</span>

									</a>
					
			
				<a href="https://pinterest.com/pin/create/button/?url=https%3A%2F%2Ftrendswave.net%2Fweb-design%2Fhow-to-build-a-javascript-page-loading-animation%2F&media=https%3A%2F%2Fcms-assets.tutsplus.com%2Fuploads%2Fusers%2F30%2Fposts%2F93911%2Fpreview_image%2Fthumb.png&description=How%20to%20Build%20a%20JavaScript%20Page%20Loading%20Animation" class="service s-pinterest tsi tsi-pinterest" 
					title="Share on Pinterest" target="_blank" rel="nofollow noopener">
					<span class="visuallyhidden">Pinterest</span>

									</a>
					
			
				<a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Ftrendswave.net%2Fweb-design%2Fhow-to-build-a-javascript-page-loading-animation%2F" class="service s-linkedin tsi tsi-linkedin" 
					title="Share on LinkedIn" target="_blank" rel="nofollow noopener">
					<span class="visuallyhidden">LinkedIn</span>

									</a>
					
			
				<a href="https://www.tumblr.com/share/link?url=https%3A%2F%2Ftrendswave.net%2Fweb-design%2Fhow-to-build-a-javascript-page-loading-animation%2F&name=How%20to%20Build%20a%20JavaScript%20Page%20Loading%20Animation" class="service s-tumblr tsi tsi-tumblr" 
					title="Share on Tumblr" target="_blank" rel="nofollow noopener">
					<span class="visuallyhidden">Tumblr</span>

									</a>
					
			
				<a href="https://wa.me/?text=How%20to%20Build%20a%20JavaScript%20Page%20Loading%20Animation%20https%3A%2F%2Ftrendswave.net%2Fweb-design%2Fhow-to-build-a-javascript-page-loading-animation%2F" class="service s-whatsapp tsi tsi-whatsapp" 
					title="Share on WhatsApp" target="_blank" rel="nofollow noopener">
					<span class="visuallyhidden">WhatsApp</span>

									</a>
					
			
				<a href="mailto:?subject=How%20to%20Build%20a%20JavaScript%20Page%20Loading%20Animation&body=https%3A%2F%2Ftrendswave.net%2Fweb-design%2Fhow-to-build-a-javascript-page-loading-animation%2F" class="service s-email tsi tsi-envelope-o" 
					title="Share via Email" target="_blank" rel="nofollow noopener">
					<span class="visuallyhidden">Email</span>

									</a>
					
			
			
		</span>
	</div>
	


	<section class="navigate-posts">
	
		<div class="previous">
					<span class="main-color title"><i class="tsi tsi-chevron-left"></i> Previous Article</span><span class="link"><a href="https://trendswave.net/marketing/web-push-notifications-the-key-to-boosting-engagement/" rel="prev">Web push notifications: The key to boosting engagement</a></span>
				</div>
		<div class="next">
					<span class="main-color title">Next Article <i class="tsi tsi-chevron-right"></i></span><span class="link"><a href="https://trendswave.net/seo/the-best-ai-content-optimization-tools-for-2025/" rel="next">The Best AI Content Optimization Tools for 2025</a></span>
				</div>		
	</section>



	<div class="author-box">
		<section class="author-info">

	<img alt='' src='https://secure.gravatar.com/avatar/4bc54c03deb4769833368b16be51dc8d?s=95&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/4bc54c03deb4769833368b16be51dc8d?s=190&d=mm&r=g 2x' class='avatar avatar-95 photo' height='95' width='95' decoding='async'/>	
	<div class="description">
		<a href="https://trendswave.net/author/admin/" title="Posts by admin" rel="author">admin</a>		
		<ul class="social-icons">
					
			<li>
				<a href="https://trendswave.net" class="icon tsi tsi-home" title="Website"> 
					<span class="visuallyhidden">Website</span></a>				
			</li>
			
			
				</ul>
		
		<p class="bio"></p>
	</div>
	
</section>	</div>


	<section class="related-posts">
							
							
				<div class="block-head block-head-ac block-head-a block-head-a1 is-left">

					<h4 class="heading">Related <span class="color">Posts</span></h4>					
									</div>
				
			
				<section class="block-wrap block-grid mb-none" data-id="2">

				
			<div class="block-content">
					
	<div class="loop loop-grid loop-grid-sm grid grid-2 md:grid-2 xs:grid-1">

					
<article class="l-post grid-post grid-sm-post">

	
			<div class="media">

		
			<a href="https://trendswave.net/web-design/a-practical-guide-to-building-with-clarity-part-2-smashing-magazine/" class="image-link media-ratio ratio-16-9" title="A Practical Guide To Building With Clarity (Part 2) — Smashing Magazine"><span data-bgsrc="https://i2.wp.com/files.smashing.media/articles/intent-prototyping-practical-guide-building-clarity/intent-prototyping-practical-guide-building-clarity.jpg?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a has-below"><h2 class="is-title post-title"><a href="https://trendswave.net/web-design/a-practical-guide-to-building-with-clarity-part-2-smashing-magazine/">A Practical Guide To Building With Clarity (Part 2) — Smashing Magazine</a></h2><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-10-03T12:35:07+00:00">October 3, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>					
<article class="l-post grid-post grid-sm-post">

	
			<div class="media">

		
			<a href="https://trendswave.net/web-design/fresh-resources-for-web-designers-and-developers-september-2025/" class="image-link media-ratio ratio-16-9" title="Fresh Resources for Web Designers and Developers (September 2025)"><span data-bgsrc="https://i3.wp.com/assets.hongkiat.com/uploads/designers-developers-monthly-09-2025/basecoat.jpg?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a has-below"><h2 class="is-title post-title"><a href="https://trendswave.net/web-design/fresh-resources-for-web-designers-and-developers-september-2025/">Fresh Resources for Web Designers and Developers (September 2025)</a></h2><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-10-02T12:34:13+00:00">October 2, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>					
<article class="l-post grid-post grid-sm-post">

	
			<div class="media">

		
			<a href="https://trendswave.net/web-design/shades-of-october-2025-wallpapers-edition-smashing-magazine/" class="image-link media-ratio ratio-16-9" title="Shades Of October (2025 Wallpapers Edition) — Smashing Magazine"><span data-bgsrc="https://i1.wp.com/files.smashing.media/articles/desktop-wallpaper-calendars-october-2025/oct-25-midnight-mischief-preview-opt.png?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a has-below"><h2 class="is-title post-title"><a href="https://trendswave.net/web-design/shades-of-october-2025-wallpapers-edition-smashing-magazine/">Shades Of October (2025 Wallpapers Edition) — Smashing Magazine</a></h2><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-10-01T12:24:29+00:00">October 1, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>					
<article class="l-post grid-post grid-sm-post">

	
			<div class="media">

		
			<a href="https://trendswave.net/web-design/principles-and-implementation-part-1-smashing-magazine/" class="image-link media-ratio ratio-16-9" title="Principles And Implementation (Part 1) — Smashing Magazine"><span data-bgsrc="https://i3.wp.com/files.smashing.media/articles/ambient-animations-web-design-principles-implementation/ambient-animations-web-design-principles-implementation.jpg?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a has-below"><h2 class="is-title post-title"><a href="https://trendswave.net/web-design/principles-and-implementation-part-1-smashing-magazine/">Principles And Implementation (Part 1) — Smashing Magazine</a></h2><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-09-29T12:18:01+00:00">September 29, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>		
	</div>

		
			</div>

		</section>
		
	</section>			
			<div class="comments">
				
	

	

	<div id="comments" class="comments-area ">

		
	
		<div id="respond" class="comment-respond">
		<div id="reply-title" class="h-tag comment-reply-title"><span class="heading">Leave A Reply</span> <small><a rel="nofollow" id="cancel-comment-reply-link" href="/web-design/how-to-build-a-javascript-page-loading-animation/#respond" style="display:none;">Cancel Reply</a></small></div><form action="https://trendswave.net/wp-comments-post.php" method="post" id="commentform" class="comment-form">
			<p>
				<textarea name="comment" id="comment" cols="45" rows="8" aria-required="true" placeholder="Your Comment"  maxlength="65525" required="required"></textarea>
			</p><p class="form-field comment-form-author"><input id="author" name="author" type="text" placeholder="Name *" value="" size="30" maxlength="245" required='required' /></p>
<p class="form-field comment-form-email"><input id="email" name="email" type="email" placeholder="Email *" value="" size="30" maxlength="100" required='required' /></p>
<p class="form-field comment-form-url"><input id="url" name="url" type="text" inputmode="url" placeholder="Website" value="" size="30" maxlength="200" /></p>

		<p class="comment-form-cookies-consent">
			<input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes" />
			<label for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time I comment.
			</label>
		</p>
<p class="form-submit"><input name="submit" type="submit" id="comment-submit" class="submit" value="Post Comment" /> <input type='hidden' name='comment_post_ID' value='5294' id='comment_post_ID' />
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />
</p></form>	</div><!-- #respond -->
	
	</div><!-- #comments -->
			</div>

		</div>
	</div>
	
			
	
	<aside class="col-4 main-sidebar has-sep" data-sticky="1">
	
			<div class="inner theiaStickySidebar">
		
			<div id="bunyad-social-1" class="widget widget-social-b">		<div class="spc-social-follow spc-social-follow-b spc-social-colors spc-social-bg">
			<ul class="services grid grid-2 md:grid-4 sm:grid-2" itemscope itemtype="http://schema.org/Organization">
				<link itemprop="url" href="https://trendswave.net/">
								
				<li class="service-wrap">

					<a href="" class="service service-link s-facebook" target="_blank" itemprop="sameAs" rel="nofollow noopener">
						<i class="the-icon tsi tsi-facebook"></i>
						<span class="label">Facebook</span>

							
					</a>

				</li>
				
								
				<li class="service-wrap">

					<a href="" class="service service-link s-twitter" target="_blank" itemprop="sameAs" rel="nofollow noopener">
						<i class="the-icon tsi tsi-twitter"></i>
						<span class="label">Twitter</span>

							
					</a>

				</li>
				
								
				<li class="service-wrap">

					<a href="" class="service service-link s-pinterest" target="_blank" itemprop="sameAs" rel="nofollow noopener">
						<i class="the-icon tsi tsi-pinterest-p"></i>
						<span class="label">Pinterest</span>

							
					</a>

				</li>
				
								
				<li class="service-wrap">

					<a href="" class="service service-link s-instagram" target="_blank" itemprop="sameAs" rel="nofollow noopener">
						<i class="the-icon tsi tsi-instagram"></i>
						<span class="label">Instagram</span>

							
					</a>

				</li>
				
								
				<li class="service-wrap">

					<a href="" class="service service-link s-youtube" target="_blank" itemprop="sameAs" rel="nofollow noopener">
						<i class="the-icon tsi tsi-youtube-play"></i>
						<span class="label">YouTube</span>

							
					</a>

				</li>
				
								
				<li class="service-wrap">

					<a href="" class="service service-link s-vimeo" target="_blank" itemprop="sameAs" rel="nofollow noopener">
						<i class="the-icon tsi tsi-vimeo"></i>
						<span class="label">Vimeo</span>

							
					</a>

				</li>
				
							</ul>
		</div>
		
		</div>
		<div id="smartmag-block-highlights-1" class="widget ts-block-widget smartmag-widget-highlights">		
		<div class="block">
					<section class="block-wrap block-highlights block-sc mb-none" data-id="3" data-is-mixed="1">

			<div class="widget-title block-head block-head-ac block-head block-head-ac block-head-g is-left has-style"><h5 class="heading">Don't Miss</h5></div>	
			<div class="block-content">
					
	<div class="loops-mixed">
			
	<div class="loop loop-grid loop-grid-base grid grid-1 md:grid-1 xs:grid-1">

					
<article class="l-post grid-post grid-base-post">

	
			<div class="media">

		
			<a href="https://trendswave.net/marketing/driving-qualified-leads-with-linkedin-content-a-proven-formula/" class="image-link media-ratio ratio-16-9" title="Driving Qualified Leads With LinkedIn Content: A Proven Formula"><span data-bgsrc="https://i3.wp.com/www.socialmediaexaminer.com/wp-content/uploads/2025/09/SMMP686_PRIMARY.jpg?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
							
				<span class="cat-labels cat-labels-overlay c-overlay p-bot-left">
				<a href="https://trendswave.net/category/marketing/" class="category term-color-31" rel="category" tabindex="-1">Marketing</a>
			</span>
						
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a has-below"><h2 class="is-title post-title"><a href="https://trendswave.net/marketing/driving-qualified-leads-with-linkedin-content-a-proven-formula/">Driving Qualified Leads With LinkedIn Content: A Proven Formula</a></h2><div class="post-meta-items meta-below"><span class="meta-item post-author"><span class="by">By</span> <a href="https://trendswave.net/author/admin/" title="Posts by admin" rel="author">admin</a></span><span class="meta-item has-next-icon date"><span class="date-link"><time class="post-date" datetime="2025-10-03T20:55:05+00:00">October 3, 2025</time></span></span><span class="meta-item comments has-icon"><a href="https://trendswave.net/marketing/driving-qualified-leads-with-linkedin-content-a-proven-formula/#respond"><i class="tsi tsi-comment-o"></i>0</a></span></div></div>			
						
				<div class="excerpt">
					<p>Are you struggling to generate qualified leads from your LinkedIn content? Wondering how to transform…</p>
				</div>
			
			
			
		</div>

	
</article>		
	</div>

		

	<div class="loop loop-small loop-small-a grid grid-1 md:grid-1 sm:grid-1 xs:grid-1">

					
<article class="l-post small-post small-a-post m-pos-left">

	
			<div class="media">

		
			<a href="https://trendswave.net/seo/google-ads-copywriting-with-ai-getting-the-prompt-right/" class="image-link media-ratio ar-bunyad-thumb" title="Google Ads copywriting with AI: Getting the prompt right"><span data-bgsrc="https://i2.wp.com/searchengineland.com/wp-content/seloads/2025/10/ChatGPT-Image-AI-powered-ad-copywriting.png?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a post-meta-left has-below"><h4 class="is-title post-title"><a href="https://trendswave.net/seo/google-ads-copywriting-with-ai-getting-the-prompt-right/">Google Ads copywriting with AI: Getting the prompt right</a></h4><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-10-03T15:39:58+00:00">October 3, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>	
					
<article class="l-post small-post small-a-post m-pos-left">

	
			<div class="media">

		
			<a href="https://trendswave.net/web-design/a-practical-guide-to-building-with-clarity-part-2-smashing-magazine/" class="image-link media-ratio ar-bunyad-thumb" title="A Practical Guide To Building With Clarity (Part 2) — Smashing Magazine"><span data-bgsrc="https://i2.wp.com/files.smashing.media/articles/intent-prototyping-practical-guide-building-clarity/intent-prototyping-practical-guide-building-clarity.jpg?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a post-meta-left has-below"><h4 class="is-title post-title"><a href="https://trendswave.net/web-design/a-practical-guide-to-building-with-clarity-part-2-smashing-magazine/">A Practical Guide To Building With Clarity (Part 2) — Smashing Magazine</a></h4><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-10-03T12:35:07+00:00">October 3, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>	
					
<article class="l-post small-post small-a-post m-pos-left">

	
			<div class="media">

		
			<a href="https://trendswave.net/marketing/meta-unveils-business-ai-and-new-generative-tools/" class="image-link media-ratio ar-bunyad-thumb" title="Meta unveils Business AI and new generative tools"><span data-bgsrc="https://i1.wp.com/searchengineland.com/wp-content/seloads/2025/03/How-to-prevent-Meta-Ads-restrictions-on-health-and-wellness-campaigns.png?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a post-meta-left has-below"><h4 class="is-title post-title"><a href="https://trendswave.net/marketing/meta-unveils-business-ai-and-new-generative-tools/">Meta unveils Business AI and new generative tools</a></h4><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-10-02T20:54:30+00:00">October 2, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>	
		
	</div>

			</div>


				</div>

		</section>
				</div>

		</div>
		<div id="smartmag-block-newsletter-1" class="widget ts-block-widget smartmag-widget-newsletter">		
		<div class="block">
			<div class="block-newsletter ">
	<div class="spc-newsletter spc-newsletter-b spc-newsletter-center spc-newsletter-sm">

		<div class="bg-wrap"></div>

		
		<div class="inner">

							<div class="mail-bg-icon">
					<i class="tsi tsi-envelope-o"></i>
				</div>
			
			
			<h3 class="heading">
				Subscribe to Updates			</h3>

							<div class="base-text message">
					<p>Get the latest creative news from Trendswave about Marketing, SEO & Web Design.</p>
</div>
			
			
			<div class="fields fields-style fields-full"><div class="wpforms-container wpforms-container-full wpforms-render-modern" id="wpforms-4425"><form id="wpforms-form-4425" class="wpforms-validate wpforms-form wpforms-ajax-form" data-formid="4425" method="post" enctype="multipart/form-data" action="/web-design/how-to-build-a-javascript-page-loading-animation/" data-token="0434aff3c5919b939c5765b7624948a5" data-token-time="1759550258"><noscript class="wpforms-error-noscript">Please enable JavaScript in your browser to complete this form.</noscript><div class="wpforms-hidden" id="wpforms-error-noscript">Please enable JavaScript in your browser to complete this form.</div><div class="wpforms-field-container">		<div id="wpforms-4425-field_1-container"
			class="wpforms-field wpforms-field-text"
			data-field-type="text"
			data-field-id="1"
			>
			<label class="wpforms-field-label" for="wpforms-4425-field_1" >Email</label>
			<input type="text" id="wpforms-4425-field_1" class="wpforms-field-medium" name="wpforms[fields][1]" >
		</div>
		<div id="wpforms-4425-field_2-container" class="wpforms-field wpforms-field-email" data-field-id="2"><label class="wpforms-field-label" for="wpforms-4425-field_2">Email</label><input type="email" id="wpforms-4425-field_2" class="wpforms-field-large" name="wpforms[fields][2]" spellcheck="false" aria-errormessage="wpforms-4425-field_2-error" ></div><script>
				( function() {
					const style = document.createElement( 'style' );
					style.appendChild( document.createTextNode( '#wpforms-4425-field_1-container { position: absolute !important; overflow: hidden !important; display: inline !important; height: 1px !important; width: 1px !important; z-index: -1000 !important; padding: 0 !important; } #wpforms-4425-field_1-container input { visibility: hidden; } #wpforms-conversational-form-page #wpforms-4425-field_1-container label { counter-increment: none; }' ) );
					document.head.appendChild( style );
					document.currentScript?.remove();
				} )();
			</script></div><!-- .wpforms-field-container --><div class="wpforms-submit-container" ><input type="hidden" name="wpforms[id]" value="4425"><input type="hidden" name="page_title" value="How to Build a JavaScript Page Loading Animation"><input type="hidden" name="page_url" value="https://trendswave.net/web-design/how-to-build-a-javascript-page-loading-animation/"><input type="hidden" name="page_id" value="5294"><input type="hidden" name="wpforms[post_id]" value="5294"><button type="submit" name="wpforms[submit]" id="wpforms-submit-4425" class="wpforms-submit" data-alt-text="Sending..." data-submit-text="Submit" aria-live="assertive" value="wpforms-submit">Submit</button><img src="https://trendswave.net/wp-content/plugins/wpforms-lite/assets/images/submit-spin.svg" class="wpforms-submit-spinner" style="display: none;" width="26" height="26" alt="Loading"></div></form></div>  <!-- .wpforms-container --></div>
		</div>
	</div>
</div>		</div>

		</div>		</div>
	
	</aside>
	
</div>
	</div>

			<footer class="main-footer cols-gap-lg footer-bold s-dark">

						<div class="upper-footer bold-footer-upper">
			<div class="ts-contain wrap">
				<div class="widgets row cf">
					<div class="widget col-4 widget_text"><div class="widget-title block-head block-head-ac block-head block-head-ac block-head-b is-left has-style"><h5 class="heading">About Us</h5></div>			<div class="textwidget"><p class="">Trendswave is an Influencer Marketing Agency with access to one of the largest influencer networks in the Poland, connecting brands and agencies to only the best influencers and social media thought leaders.</p>
</div>
		</div>
		<div class="widget col-4 ts-block-widget smartmag-widget-posts-small">		
		<div class="block">
					<section class="block-wrap block-posts-small block-sc mb-none" data-id="6">

			<div class="widget-title block-head block-head-ac block-head block-head-ac block-head-b is-left has-style"><h5 class="heading">Our Picks</h5></div>	
			<div class="block-content">
				
	<div class="loop loop-small loop-small-a loop-sep loop-small-sep grid grid-1 md:grid-1 sm:grid-1 xs:grid-1">

					
<article class="l-post small-post small-a-post m-pos-left">

	
			<div class="media">

		
			<a href="https://trendswave.net/marketing/driving-qualified-leads-with-linkedin-content-a-proven-formula/" class="image-link media-ratio ar-bunyad-thumb" title="Driving Qualified Leads With LinkedIn Content: A Proven Formula"><span data-bgsrc="https://i3.wp.com/www.socialmediaexaminer.com/wp-content/uploads/2025/09/SMMP686_PRIMARY.jpg?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a post-meta-left has-below"><h4 class="is-title post-title"><a href="https://trendswave.net/marketing/driving-qualified-leads-with-linkedin-content-a-proven-formula/">Driving Qualified Leads With LinkedIn Content: A Proven Formula</a></h4><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-10-03T20:55:05+00:00">October 3, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>	
					
<article class="l-post small-post small-a-post m-pos-left">

	
			<div class="media">

		
			<a href="https://trendswave.net/seo/google-ads-copywriting-with-ai-getting-the-prompt-right/" class="image-link media-ratio ar-bunyad-thumb" title="Google Ads copywriting with AI: Getting the prompt right"><span data-bgsrc="https://i2.wp.com/searchengineland.com/wp-content/seloads/2025/10/ChatGPT-Image-AI-powered-ad-copywriting.png?w=1024&resize=1024,1024&ssl=1" class="img bg-cover wp-post-image attachment-large size-large lazyload"></span></a>			
			
			
			
		
		</div>
	

	
		<div class="content">

			<div class="post-meta post-meta-a post-meta-left has-below"><h4 class="is-title post-title"><a href="https://trendswave.net/seo/google-ads-copywriting-with-ai-getting-the-prompt-right/">Google Ads copywriting with AI: Getting the prompt right</a></h4><div class="post-meta-items meta-below"><span class="meta-item date"><span class="date-link"><time class="post-date" datetime="2025-10-03T15:39:58+00:00">October 3, 2025</time></span></span></div></div>			
			
			
		</div>

	
</article>	
		
	</div>

					</div>

		</section>
				</div>

		</div><div class="widget col-4 widget_nav_menu"><div class="widget-title block-head block-head-ac block-head block-head-ac block-head-b is-left has-style"><h5 class="heading">Quicklinks</h5></div><div class="menu-top-links-container"><ul id="menu-top-links" class="menu"><li id="menu-item-4431" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-4431"><a href="https://trendswave.net/category/influencer-marketing/">Influencer Marketing</a></li>
<li id="menu-item-4432" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-4432"><a href="https://trendswave.net/category/marketing/">Marketing</a></li>
<li id="menu-item-4433" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-4433"><a href="https://trendswave.net/category/seo/">SEO</a></li>
<li id="menu-item-4434" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-4434"><a href="https://trendswave.net/category/social-media/">Social Media</a></li>
<li id="menu-item-4435" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-4435"><a href="https://trendswave.net/category/web-design/">Web Design</a></li>
</ul></div></div>				</div>
			</div>
		</div>
		
	
			<div class="lower-footer bold-footer-lower">
			<div class="ts-contain inner">

				

				
											
						<div class="links">
							<div class="menu-footer-links-container"><ul id="menu-footer-links" class="menu"><li id="menu-item-4402" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4402"><a href="https://trendswave.net/about-us/">About Us</a></li>
<li id="menu-item-4403" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4403"><a href="https://trendswave.net/contact-us/">Contact Us</a></li>
<li id="menu-item-4404" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4404"><a href="https://trendswave.net/disclaimer/">Disclaimer</a></li>
<li id="menu-item-4405" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4405"><a href="https://trendswave.net/privacy-policy/">Privacy Policy</a></li>
<li id="menu-item-4406" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4406"><a href="https://trendswave.net/terms-and-conditions/">Terms and Conditions</a></li>
</ul></div>						</div>
						
				
				<div class="copyright">
					© 2025 <a href="https://trendswave.net/">Trendswave</a>.All Rights Reserved				</div>
			</div>
		</div>		
			</footer>
		
	
</div><!-- .main-wrap -->



	<div class="search-modal-wrap" data-scheme="dark">
		<div class="search-modal-box" role="dialog" aria-modal="true">

			<form method="get" class="search-form" action="https://trendswave.net/">
				<input type="search" class="search-field live-search-query" name="s" placeholder="Search..." value="" required />

				<button type="submit" class="search-submit visuallyhidden">Submit</button>

				<p class="message">
					Type above and press <em>Enter</em> to search. Press <em>Esc</em> to cancel.				</p>
						
			</form>

		</div>
	</div>


<div class="gtranslate_wrapper" id="gt-wrapper-35437179"></div><script type="application/ld+json">{"@context":"http:\/\/schema.org","@type":"Article","headline":"How to Build a JavaScript Page Loading Animation","url":"https:\/\/trendswave.net\/web-design\/how-to-build-a-javascript-page-loading-animation\/","image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/cms-assets.tutsplus.com\/uploads\/users\/30\/posts\/93911\/preview_image\/thumb.png?w=1200&resize=1200,0&ssl=1","width":1200,"height":0},"datePublished":"2025-02-06T12:38:03+00:00","dateModified":"2025-02-06T12:38:03+00:00","author":{"@type":"Person","name":"admin","url":"https:\/\/trendswave.net\/author\/admin\/"},"publisher":{"@type":"Organization","name":"Trendswave Media","sameAs":"https:\/\/trendswave.net","logo":{"@type":"ImageObject","url":"https:\/\/trendswave.net\/wp-content\/uploads\/2024\/11\/Logo-update-scaled.jpg"}},"mainEntityOfPage":{"@type":"WebPage","@id":"https:\/\/trendswave.net\/web-design\/how-to-build-a-javascript-page-loading-animation\/"}}</script>
			<script type='text/javascript'>
				const lazyloadRunObserver = () => {
					const lazyloadBackgrounds = document.querySelectorAll( `.e-con.e-parent:not(.e-lazyloaded)` );
					const lazyloadBackgroundObserver = new IntersectionObserver( ( entries ) => {
						entries.forEach( ( entry ) => {
							if ( entry.isIntersecting ) {
								let lazyloadBackground = entry.target;
								if( lazyloadBackground ) {
									lazyloadBackground.classList.add( 'e-lazyloaded' );
								}
								lazyloadBackgroundObserver.unobserve( entry.target );
							}
						});
					}, { rootMargin: '200px 0px 200px 0px' } );
					lazyloadBackgrounds.forEach( ( lazyloadBackground ) => {
						lazyloadBackgroundObserver.observe( lazyloadBackground );
					} );
				};
				const events = [
					'DOMContentLoaded',
					'elementor/lazyload/observe',
				];
				events.forEach( ( event ) => {
					document.addEventListener( event, lazyloadRunObserver );
				} );
			</script>
			<script data-cfasync="false">SphereCore_AutoPosts = [{"id":5292,"title":"Web push notifications: The key to boosting engagement","url":"https:\/\/trendswave.net\/marketing\/web-push-notifications-the-key-to-boosting-engagement\/"},{"id":5290,"title":"How to Never Run Out of Social Media Content Ideas [27 Prompts]","url":"https:\/\/trendswave.net\/social-media\/how-to-never-run-out-of-social-media-content-ideas-27-prompts\/"},{"id":5288,"title":"The Customer Love Collection: Top 5 UGC Campaigns that Boosted Brand Sales - GRIN","url":"https:\/\/trendswave.net\/influencer-marketing\/the-customer-love-collection-top-5-ugc-campaigns-that-boosted-brand-sales-grin\/"},{"id":5286,"title":"How to Build a Landing Page in 6 Easy Steps","url":"https:\/\/trendswave.net\/seo\/how-to-build-a-landing-page-in-6-easy-steps\/"},{"id":5284,"title":"From Simple Data Transfer To Modern Composable Architectures \u2014 Smashing Magazine","url":"https:\/\/trendswave.net\/web-design\/from-simple-data-transfer-to-modern-composable-architectures-smashing-magazine\/"},{"id":5282,"title":"Beyond the Buzzer: How Sports Collectibles Are Winning the Social Media Game","url":"https:\/\/trendswave.net\/social-media\/beyond-the-buzzer-how-sports-collectibles-are-winning-the-social-media-game\/"}];</script>	<script type='text/javascript'>
		(function () {
			var c = document.body.className;
			c = c.replace(/woocommerce-no-js/, 'woocommerce-js');
			document.body.className = c;
		})();
	</script>
	<script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@type":"WebPage","@id":"https:\/\/trendswave.net\/","name":"Home"}},{"@type":"ListItem","position":2,"item":{"@type":"WebPage","@id":"https:\/\/trendswave.net\/category\/web-design\/","name":"Web Design"}},{"@type":"ListItem","position":3,"item":{"@type":"WebPage","@id":"https:\/\/trendswave.net\/web-design\/how-to-build-a-javascript-page-loading-animation\/","name":"How to Build a JavaScript Page Loading Animation"}}]}</script>
<link rel='stylesheet' id='fifu-woo-css' href='https://trendswave.net/wp-content/plugins/featured-image-from-url/includes/html/css/woo.css?ver=4.9.4' type='text/css' media='all' />
<style id='fifu-woo-inline-css' type='text/css'>
img.zoomImg {display:inline !important}
</style>
<link rel='stylesheet' id='wc-blocks-style-css' href='https://trendswave.net/wp-content/plugins/woocommerce/assets/client/blocks/wc-blocks.css?ver=wc-9.3.3' type='text/css' media='all' />
<link rel='stylesheet' id='wpforms-modern-full-css' href='https://trendswave.net/wp-content/plugins/wpforms-lite/assets/css/frontend/modern/wpforms-full.min.css?ver=1.9.2.1' type='text/css' media='all' />
<script type="text/javascript" id="smartmag-lazyload-js-extra">
/* <![CDATA[ */
var BunyadLazyConf = {"type":"normal"};
/* ]]> */
</script>
<script type="text/javascript" src="https://trendswave.net/wp-content/themes/smart-mag/js/lazyload.js?ver=10.2.1" id="smartmag-lazyload-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/woocommerce/assets/js/sourcebuster/sourcebuster.min.js?ver=9.3.3" id="sourcebuster-js-js"></script>
<script type="text/javascript" id="wc-order-attribution-js-extra">
/* <![CDATA[ */
var wc_order_attribution = {"params":{"lifetime":1.0e-5,"session":30,"base64":false,"ajaxurl":"https:\/\/trendswave.net\/wp-admin\/admin-ajax.php","prefix":"wc_order_attribution_","allowTracking":true},"fields":{"source_type":"current.typ","referrer":"current_add.rf","utm_campaign":"current.cmp","utm_source":"current.src","utm_medium":"current.mdm","utm_content":"current.cnt","utm_id":"current.id","utm_term":"current.trm","utm_source_platform":"current.plt","utm_creative_format":"current.fmt","utm_marketing_tactic":"current.tct","session_entry":"current_add.ep","session_start_time":"current_add.fd","session_pages":"session.pgs","session_count":"udata.vst","user_agent":"udata.uag"}};
/* ]]> */
</script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/woocommerce/assets/js/frontend/order-attribution.min.js?ver=9.3.3" id="wc-order-attribution-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/sphere-core/components/auto-load-post/js/auto-load-post.js?ver=1.6.9" id="spc-auto-load-post-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/themes/smart-mag/js/jquery.mfp-lightbox.js?ver=10.2.1" id="magnific-popup-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/themes/smart-mag/js/jquery.sticky-sidebar.js?ver=10.2.1" id="theia-sticky-sidebar-js"></script>
<script type="text/javascript" id="smartmag-theme-js-extra">
/* <![CDATA[ */
var Bunyad = {"ajaxurl":"https:\/\/trendswave.net\/wp-admin\/admin-ajax.php"};
/* ]]> */
</script>
<script type="text/javascript" src="https://trendswave.net/wp-content/themes/smart-mag/js/theme.js?ver=10.2.1" id="smartmag-theme-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/themes/smart-mag/js/float-share.js?ver=10.2.1" id="smartmag-float-share-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-includes/js/comment-reply.min.js?ver=6.6.2" id="comment-reply-js" async="async" data-wp-strategy="async"></script>
<script type="text/javascript" id="fifu-image-js-js-extra">
/* <![CDATA[ */
var fifuImageVars = {"fifu_woo_lbox_enabled":"1","fifu_is_product":"","fifu_is_flatsome_active":""};
/* ]]> */
</script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/featured-image-from-url/includes/html/js/image.js?ver=4.9.4" id="fifu-image-js-js"></script>
<script type="text/javascript" id="fifu-json-ld-js-extra">
/* <![CDATA[ */
var fifuJsonLd = {"url":"https:\/\/i2.wp.com\/cms-assets.tutsplus.com\/uploads\/users\/30\/posts\/93911\/preview_image\/thumb.png?ssl=1"};
/* ]]> */
</script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/featured-image-from-url/includes/html/js/json-ld.js?ver=4.9.4" id="fifu-json-ld-js"></script>
<script type="text/javascript" id="gt_widget_script_35437179-js-before">
/* <![CDATA[ */
window.gtranslateSettings = /* document.write */ window.gtranslateSettings || {};window.gtranslateSettings['35437179'] = {"default_language":"en","languages":["en","pl","es"],"url_structure":"none","flag_style":"2d","flag_size":24,"wrapper_selector":"#gt-wrapper-35437179","alt_flags":[],"switcher_open_direction":"top","switcher_horizontal_position":"right","switcher_vertical_position":"top","switcher_text_color":"#f7f7f7","switcher_arrow_color":"#f2f2f2","switcher_border_color":"#161616","switcher_background_color":"#303030","switcher_background_shadow_color":"#474747","switcher_background_hover_color":"#3a3a3a","dropdown_text_color":"#eaeaea","dropdown_hover_color":"#748393","dropdown_background_color":"#474747","flags_location":"\/wp-content\/plugins\/gtranslate\/flags\/"};
/* ]]> */
</script><script src="https://trendswave.net/wp-content/plugins/gtranslate/js/dwf.js?ver=6.6.2" data-no-optimize="1" data-no-minify="1" data-gt-orig-url="/web-design/how-to-build-a-javascript-page-loading-animation/" data-gt-orig-domain="trendswave.net" data-gt-widget-id="35437179" defer></script><script type="text/javascript" src="https://trendswave.net/wp-content/plugins/wpforms-lite/assets/lib/jquery.validate.min.js?ver=1.21.0" id="wpforms-validation-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/wpforms-lite/assets/lib/mailcheck.min.js?ver=1.1.2" id="wpforms-mailcheck-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/wpforms-lite/assets/lib/punycode.min.js?ver=1.0.0" id="wpforms-punycode-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/wpforms-lite/assets/js/share/utils.min.js?ver=1.9.2.1" id="wpforms-generic-utils-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms.min.js?ver=1.9.2.1" id="wpforms-js"></script>
<script type="text/javascript" src="https://trendswave.net/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms-modern.min.js?ver=1.9.2.1" id="wpforms-modern-js"></script>
<script type='text/javascript'>
/* <![CDATA[ */
var wpforms_settings = {"val_required":"This field is required.","val_email":"Please enter a valid email address.","val_email_suggestion":"Did you mean {suggestion}?","val_email_suggestion_title":"Click to accept this suggestion.","val_email_restricted":"This email address is not allowed.","val_number":"Please enter a valid number.","val_number_positive":"Please enter a valid positive number.","val_minimum_price":"Amount entered is less than the required minimum.","val_confirm":"Field values do not match.","val_checklimit":"You have exceeded the number of allowed selections: {#}.","val_limit_characters":"{count} of {limit} max characters.","val_limit_words":"{count} of {limit} max words.","val_recaptcha_fail_msg":"Google reCAPTCHA verification failed, please try again later.","val_turnstile_fail_msg":"Cloudflare Turnstile verification failed, please try again later.","val_inputmask_incomplete":"Please fill out the field in required format.","uuid_cookie":"","locale":"en","country":"","country_list_label":"Country list","wpforms_plugin_url":"https:\/\/trendswave.net\/wp-content\/plugins\/wpforms-lite\/","gdpr":"","ajaxurl":"https:\/\/trendswave.net\/wp-admin\/admin-ajax.php","mailcheck_enabled":"1","mailcheck_domains":[],"mailcheck_toplevel_domains":["dev"],"is_ssl":"1","currency_code":"USD","currency_thousands":",","currency_decimals":"2","currency_decimal":".","currency_symbol":"$","currency_symbol_pos":"left","val_requiredpayment":"Payment is required.","val_creditcard":"Please enter a valid credit card number.","css_vars":["field-border-radius","field-border-style","field-border-size","field-background-color","field-border-color","field-text-color","field-menu-color","label-color","label-sublabel-color","label-error-color","button-border-radius","button-border-style","button-border-size","button-background-color","button-border-color","button-text-color","page-break-color","background-image","background-position","background-repeat","background-size","background-width","background-height","background-color","background-url","container-padding","container-border-style","container-border-width","container-border-color","container-border-radius","field-size-input-height","field-size-input-spacing","field-size-font-size","field-size-line-height","field-size-padding-h","field-size-checkbox-size","field-size-sublabel-spacing","field-size-icon-size","label-size-font-size","label-size-line-height","label-size-sublabel-font-size","label-size-sublabel-line-height","button-size-font-size","button-size-height","button-size-padding-h","button-size-margin-top","container-shadow-size-box-shadow"],"isModernMarkupEnabled":"1","formErrorMessagePrefix":"Form error message","errorMessagePrefix":"Error message","submitBtnDisabled":"Submit button is disabled during form submission.","error_updating_token":"Error updating token. Please try again or contact support if the issue persists.","network_error":"Network error or server is unreachable. Check your connection or try again later.","token_cache_lifetime":"86400","hn_data":{"4425":1}}
/* ]]> */
</script>


</body>
</html>