Creating a Star Wars Crawl Effect in JupiterX Using Elementor’s HTML Widget


In this article, we’ll walk through creating a Star Wars–style scrolling text crawl in JupiterX with Elementor’s HTML widget. Along the way, you’ll learn how HTML, CSS, and JavaScript work together to create an interactive effect.


This is both a practical example and a beginner-friendly lesson in web fundamentals.


Step 1: Understanding the Building Blocks


Before diving into the code, let’s break down the three key layers of a web page:

  1. HTML (Structure)
    • Think of HTML as the skeleton of your webpage.
    • It tells the browser what content exists: titles, paragraphs, images, buttons, etc.
  2. CSS (Styling)
    • CSS is the clothing and design for the skeleton.
    • It changes how things look: colors, layout, animations, and spacing.
  3. JavaScript (Interactivity)
    • JavaScript is the brain that makes the page interactive.
    • It allows users to click, scroll, and interact with the content dynamically.


When you combine them:

  • HTML gives you the text,
  • CSS makes it scroll in a Star Wars–style perspective,
  • JavaScript triggers the animation when the user clicks.

Step 2: Adding the HTML Code

Open Elementor, drag an HTML widget into your section, and paste this code inside:

<div class="overlay" id="startOverlay">Click anywhere to start</div>
<div class="star-wars">
  <div class="crawl" id="crawlText">
    <div class="title">
      <p>Episode IV</p>
      <h1>LOREM IPSUM</h1>
    </div>
    <p>It is a period of graphic design. Lorem ipsum dolor sit amet...</p>
    <p>You can replace this text with your own storyline.</p>
  </div>
</div>

What’s happening here?

  • <div> elements are containers for grouping content.
  • The .overlay is the black screen with “Click anywhere to start”.
  • The .star-wars div holds the whole animation space.
  • The .crawl div contains all the text that scrolls up.
  • Inside .crawl, we have a .title with Episode text and paragraphs (<p>) for the story.

So HTML is simply saying:

“Here’s a black screen, here’s a section for the crawl, and here’s the text that will move.”


Step 3: Adding CSS (Styling and Animation)

Now let’s style it with CSS. Add this inside the same widget, wrapped in <style> tags:

<style>
  body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    background: black;
    font-family: 'Arial Black', sans-serif;
    color: #feda4a;
    perspective: 400px;
  }

  .star-wars {
    position: relative;
    height: 100vh;
    overflow: hidden;
  }

  .crawl {
    position: absolute;
    top: 100vh;
    width: 100%;
    transform-origin: 50% 100%;
  }

  .crawl.animate {
    animation: crawl 120s linear forwards;
  }

  .crawl .title {
    text-align: center;
    font-size: 2em;
  }

  .crawl p {
    text-align: justify;
    width: 60%;
    margin: 1em auto;
    font-size: 1.2em;
    line-height: 1.5em;
  }

  @keyframes crawl {
    0% {
      top: 100vh;
      transform: rotateX(20deg) translateZ(0);
    }
    100% {
      top: -1000vh;
      transform: rotateX(25deg) translateZ(-3000px);
    }
  }

  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #feda4a;
    font-size: 2em;
    cursor: pointer;
    z-index: 10;
    transition: opacity 1s ease;
  }

  .overlay.hidden {
    opacity: 0;
    pointer-events: none;
  }
</style>

Key things to notice:

  • body { background: black; } → gives the space look.
  • .crawl.animate { animation: crawl 120s linear forwards; } → defines the scroll effect.
  • @keyframes crawl { ... } → tells the browser how to animate: starting from bottom, tilting back, and moving up.
  • .overlay → covers the screen until the user clicks.

This is the visual magic. Without CSS, the text would just sit there.


Step 4: Adding JavaScript (Interactivity)

Finally, let’s add the interactivity so the crawl starts when you click. Place this inside <script> tags:

<script>
  const overlay = document.getElementById('startOverlay');
  const crawl = document.getElementById('crawlText');

  document.body.addEventListener('click', () => {
    overlay.classList.add('hidden');
    crawl.classList.add('animate');
  });
</script>

Breaking it down:

  • const overlay = document.getElementById('startOverlay');

    → Finds the overlay div by its ID.

  • document.body.addEventListener('click', () => { ... });

    → Waits for you to click anywhere on the page.

  • overlay.classList.add('hidden');

    → Hides the black overlay.

  • crawl.classList.add('animate');

    → Adds the CSS animation class to start scrolling the text.


This is the logic that ties everything together.


Step 5: Wrapping It All Together

When you paste the code into Elementor, you’ll wrap it like this:

<style>/* CSS goes here */</style>

<div class="overlay" id="startOverlay">Click anywhere to start</div>
<div class="star-wars">
  <div class="crawl" id="crawlText">
    <!-- Your text here -->
  </div>
</div>

<script>/* JS goes here */</script>
  • CSS is wrapped in <style> tags
  • JavaScript is wrapped in <script> tags
  • HTML stays as regular tags

Step 6: Customization Ideas

  • Change Speed: edit 120s in .crawl.animate.
  • Change Colors: replace #feda4a with any color.
  • Change Text: update the <p> and <h1> inside .crawl.

Final Thoughts

By following this tutorial, you’ve not only created a fun Star Wars intro effect in JupiterX with Elementor, but you’ve also learned the basics of how HTML (structure), CSS (style), and JavaScript (behavior) work together.


This is a great starting point for experimenting with animations and interactivity on your website.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.