Create a Marquee Button in Showit in Three Simple Steps!

It’s the little things that stand out. Marquee buttons do not only have a visual but also a functional impact. They look great, and can also fit a longer button text in one line instead of having you increase the size of the button to fit a 2 line CTA or button text (especially on mobile design).

Here is an example of what we are going to build today:

Click on the button below

This tutorial will show you how to create a marquee button in ShowIt.

Step 1: Create a regular button.

Unless you are completely new to Showit, you already know how to create a button. Add a rectangle, and add a text box on top of it.
If you need help creating a button, you can follow a very comprehensive tutorial on ShowIt docs here.

You can also go ahead and set the click action for your button.

Step 2: Set the size for your text box and open its HTML editor.

You are free to use a paragraph box, a subheading, a title, or a heading box – whatever is part of your workflow when you create buttons.

Set the width and height for your text box. Take note of the width you have set – this will come in handy in the next step.

ALT + Double-click on your text box, and it will now open its HTML Editor.

Step 3: Copy and paste the code, and add your text.

Replace the text currently inside the HTML Editor, with the code below:

<div class="marquee">
	<span>YOUR CUSTOM TEXT HERE. IT CAN BE AS LONG AS YOU NEED IT TO BE</span>
</div>
<style>
.marquee {
    width:YOUR TEXT BOX WIDTH FROM STEP 2;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}
.marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 8s linear infinite;
}
@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}
</style>
 

In the code, find and replace “YOUR CUSTOM TEXT HERE. IT CAN BE AS LONG AS YOU NEED IT TO BE” with your own text.

Find this line:

width:YOUR TEXT BOX WIDTH FROM STEP 2;

And replace it with your text box width from step 2. For example:

width:180px;

Don’t forget to add the ‘px’ behind the number!

You can control the speed of the marquee by adjusting the animation time here:

animation: marquee 8s linear infinite;

And you’re done! That was easy, wasn’t it?

If you liked the post, share it with your fellow ShowIt designers and developers. You can leave a comment if you have questions/suggestions.

Follow me on Instagram

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

YOU MAY ALSO LIKE

How to Create an Infinite Marquee in 3 Simple Steps

Looking to add a dynamic, eye-catching element to your Showit website? An infinite marquee is a perfect way to showcase important announcements, promotions, or just add a bit of flair to your design. In this tutorial, we'll walk you through three simple steps to...

Add an Animated Gradient Background to Your Showit Website

Creating a visually stunning website is all about the details, and adding an animated gradient background to your Showit site can take your design to the next level. This subtle yet impactful feature not only adds depth and movement to your pages but also helps...

How to Create a Custom Mouse Pointer in Showit Using CSS

If you want to make your Showit website stand out and reflect your unique style, you can consider creating a custom mouse pointer using CSS. By replacing the standard mouse cursor with a personalized design or icon, you can enhance the visual appeal and branding of...