CSS

Create Marquee in webpage using CSS

Marquee is an animation effect for web pages used to create horizontal or vertical scrolling text and images. The <marquee> element of HTML is not a standard-compliant, ie the element is not part of the W3 HTML specifications.

For creating a marquee using CSS, we have to use the CSS animation property together with the @keyframes rule.

Source Code :

<style>
  body{
    background:#000;
    overflow-x: hidden;
  }
  .marquee{
    color:#fff;
    font-size: 3em;
    width: 100%;
    height: 100%;
    margin: 0;
    line-height: 50px;
    text-align: center;    
    transform:translateX(100%);
    animation: cssmarquee 25s linear infinite;
  }
  
  @keyframes cssmarquee {
    0%{ 
      transform: translateX(100%);       
    }

    100%{
      transform: translateX(-100%); 
    }
  }
</style>
  
<h1 class="marquee">
  CSS Marquee Goes Here ..... Text Scrolling 
</h1>

 

Follow this video for complete guidance :

Admin

Recent Posts

Build a simple JavaScript Calculator for basic arithmetic operations

In this article, we will build a simple calculator using JavaScript that can carry out…

4 days ago

Tech Bloggers Association organizing Blogging Competition for Women

In honor of Girls in ICT Day, the Tech Bloggers Association of Nepal (TBAN) proudly…

5 days ago

Navigating the Newsroom: The Impact of AI on Journalism

In the ever-evolving landscape of journalism, the emergence of Artificial Intelligence (AI) is reshaping traditional…

5 days ago

Hello Topik – The Ultimate Korean EPS Preparation App

App Created by Bishow Bhasa Campus Korean Language HOD, Mr. Thaneshwor Banjade with over 20…

5 days ago

Roundtable Highlights Nepal’s Software Export Potential: Challenges & Strategies

A recent roundtable discussion hosted by the South Asia Watch on Trade, Economics, and Environment…

1 week ago

Top 10 iPhone hacks you may not know

In the ever-evolving world of technology, our smartphones have become indispensable companions, particularly the iconic…

2 weeks ago

This website uses cookies.