Webpage Text Animation

This is the visual representation of my webpage: https://i.stack.imgur.com/tYq34.png

I am seeking to implement a uniform animation effect for the text "Carlos Qiano" and "Lorem Ipsum", similar to the link below: https://i.stack.imgur.com/XVnBS.jpg

Note:

  • The text "Carlos Qiano" should fade out thrice upon initial landing on the webpage. Subsequently, the text should zoom in and out continuously.
  • The text "Lorem Ipsum." should also undergo a repeated zoom in and out effect.

Below is my current HTML code that requires modification. The animate.css library has been utilized in the code. Please feel free to make adjustments and integrate other animation libraries as needed.

<!DOCTYPE html>
<html>
   <head>
      <title>Background Top</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1" >
      <!-- Bootstrap 4 -->
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"/>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
      <!-- jQuery -->
      <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
      <!-- Animation -->
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
   </head>
   <style type="text/css">
      body{
        margin-top: 53px;
      }
      .jumbotron {
        background-image: url("background1.jpg");
        text-align: center;
        height:523px;
        background-size: cover;
        margin:0 !important;
        display: flex;
        justify-content: center;
        flex-direction: column;
      }
      .mainText {
        width: 100%;
        font-family: Verdana,sans-serif;
        font-size: 120px !important;
        margin-top: 35px; 
        color: black;
        margin: 0 0 5rem 0;
        animation-duration: 2s;
        animation-iteration-count:infinite;
        animation-delay: 1s;
      }
      .subText {
        font-size: 20px;
        font-family: Georgia,serif;
        font-style:italic;
        line-height: 1.6;
        color: black;
        animation-duration:2s;
        animation-iteration-count:infinite;
        animation-delay:1s;
      }
      @media screen and (max-width: 768px) {
        .mainText {
          margin-bottom: 0;
        }
        .subText {
          display: none;
        }
      }
   </style>
   <body>
      <!-- //SECTION FOR PAGE TOP -->
      <section id="page-top">
         <div class="jumbotron">
            <p data-aos="zoom-out" data-aos-delay="500" class="lead mainText pulse green aos-init aos-animate" id="name">Carlos Qiano</p>
            <p data-aos="zoom-out" data-aos-delay="500" class="lead pulse lightGreen aos-init aos-animate d-md-block subText">Lorem Ipsum.<br>Lorem Ipsum.</p>
         </div>
      </section>
      <br><br><br>
      <script>
        $(function() {
          $("#name").fadeOut(750).fadeIn(750);
          $("#name").fadeOut(750).fadeIn(750);
          $("#name").fadeOut(750).fadeIn(750);
        });
      </script>
   </body>
</html>

Answer №1

Starting the pulse animation at the beginning may be a better option, but please let me know if this aligns with your preference :)

$(function() {
  $("#name").fadeOut(750).fadeIn(750).fadeOut(750).fadeIn(750).fadeOut(750).fadeIn(750, function(){
    $(".subText, #name").removeClass('animate__pulse');
    // reset of pulse animation to make it sync
    setTimeout(function(){ $(".subText, #name").addClass('animate__pulse');  }, 0); 
  });
});
body{
        margin-top: 53px;
      }
      .jumbotron {
        background-image: url("background1.jpg");
        text-align: center;
        height:523px;
        background-size: cover;
        margin:0 !important;
        display: flex;
        justify-content: center;
        flex-direction: column;
      }
      .mainText {
        width: 100%;
        font-family: Verdana,sans-serif;
        font-size: 80px !important;
        margin-top: 35px; 
        color: black;
        margin: 0 0 5rem 0;
        animation-duration: 2s;
        animation-iteration-count:infinite;
        animation-delay: 1s;
      }
      .subText {
        font-size: 20px;
        font-family: Georgia,serif;
        font-style:italic;
        line-height: 1.6;
        color: black;
        animation-duration:2s;
        animation-iteration-count:infinite;
        animation-delay:1s;  
      }
      @media screen and (max-width: 768px) {
        .mainText {
          margin-bottom: 0;
        }
        .subText {
          display: none;
        }
      }
<meta name="viewport" content="width=device-width, initial-scale=1" >
      <!-- Bootstrap 4 -->
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"/>
      
      <!-- jQuery -->
      <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

      <!-- Animation -->
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>

      <!-- //SECTION FOR PAGE TOP -->
      <section id="page-top">
         <div class="jumbotron">
            <p data-aos="zoom-out" data-aos-delay="500" class="lead mainText green aos-init aos-animate" id="name">Carlos Qiano</p>
            <p data-aos="zoom-out" data-aos-delay="500" class="lead animate__pulse lightGreen aos-init aos-animate d-md-block subText">Lorem Ipsum.<br>Lorem Ipsum.</p>
         </div>
      </section>
      <br><br><br>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to retrieve the value of a property within a JavaScript object?

I am facing an issue with retrieving the value of the status property from an object in my code. Below is a snippet of what I have tried: console.log("Resource.query()"); console.log(Resource.query()); console.log("Resource.query().status"); console.log(R ...

Implementing a jQuery Popup to Show Error Messages

Is there a way to display error messages in a popup and hide all form fields when a success message appears? Currently, I am placing the success message above the form and closing it after the form is submitted. The error message div is placed inside the s ...

What is the process for aligning text with the margin on the left side

Inside a span block, there is an icon: <span><i></i>Text</span> The CSS for the icon is as follows: i { display: inline-block; width: 20px; height: 20px; } When the text inside the span is long, it wraps to the next lin ...

Creating a Wordpress Metabox that utilizes radio inputs generated with Javascript instead of the traditional checked() function in Javascript as an alternative

Despite my efforts to find a solution on various forums, I am still stuck with this issue without making any progress. The code snippet below contains two Radio inputs. These inputs are generated on the post edit page of Wordpress CMS and their values com ...

Is it possible to generate a basic HTML page using Express JS without utilizing Ejs or any other templating engine

I have a basic HTML file with a Bootstrap form, along with a simple API coded within. In my server.js file, I've specified that when I request /about, it should redirect me to the about.html page. However, instead of redirecting, I'm encountering ...

After the page reload, the text box remains filled and does not reset to null

Even after refreshing the page, the text box does not reset to null. It retains the value that was entered previously. This issue occurs while implementing pagination. <form method='post' class="search" action="<?= base_url() ?>my-subsc ...

The width of the Bootstrap tooltip changes when hovered over

Currently, I am facing a peculiar issue with my angular web-application. Within the application, there is a matrix displaying data. When I hover over the data in this matrix, some basic information about the object pops up. Strangely, every time I hover ov ...

Using a split string to destructure an array with a mix of let and const variables

There is a problem with TS: An error occurs stating that 'parsedHours' and 'parsedMinutes' should be declared as constants by using 'const' instead of 'prefer-const'. This issue arises when attempting to destructure ...

Creating Test Cases for Service Response Validation

I am currently attempting to unit test an API within my ngOnInit method. The method is responsible for making a call to the service in order to fetch details. If the details are not undefined, an array called 'shoeDataResponse' of type *shoeData ...

Internet Explorer 7 does not support the return link feature when using jQuery

My issue involves using jQuery and Ajax, where my Ajax.php file outputs a specific field into the main file. Everything works as expected when I click in Mozilla and Chrome, resulting in an alert pop-up. However, when attempting the same action in Internet ...

Tips for creating a CSS triangle background on a div without relying on borders or images

I have experience creating triangles using CSS borders and images, but this time I want to achieve it using background color. Here is the image of the desired outcome: https://i.stack.imgur.com/qP3yt.jpg If anyone can assist me with this, it would be gre ...

Steps for removing a chosen file from several input files by clicking a button

Within my application, there is an input file that displays a list of selected files underneath it. Each of these selected files has a corresponding remove button. While I am able to successfully remove a single file with ease, I struggle when attempting t ...

Incorporating external CSS and JS files into your WordPress website

Hello, I am unfamiliar with the Wordpress framework and I am seeking guidance on how to add an external CSS and JS file to my Wordpress page. I have successfully created a new page, but would like to incorporate a CSS and JS file into it. Would creating a ...

Is it possible to harness the power of the Gmail SMTP server in conjunction with WAMP or XAMPP to send emails locally using the mail

I encountered a lot of outdated posts while searching for solutions. In the php.ini file, you can authenticate using: auth_username auth_password Therefore, I attempted to incorporate this in my php.ini: SMTP = smtp.gmail.com smtp_port = 465 auth_userna ...

Tips for creating various instances of a single type within mock data

In my Schema.js, I have a simple schema and server setup: const typeDefs = gql` type Query { people: [Person!]! } type Person { name: String! age: Int! job: String } `; And here is my server configuration: const mocks = { Person ...

Dynamically update a form with steps using JQuery-steps and send all objects to the controller

In the context of a form, it is possible to dynamically add between 1 to n records before passing it to the controller with data. The following represents the ViewModel for the form: public class AddFieldDataViewModel { public int SampleID { get; se ...

Is there a way to access the original query string without it being automatically altered by the browser?

I'm currently encountering an issue with query strings. When I send an activation link via email, the link contains a query string including a user activation token. Here's an example of the link: http://localhost:3000/#/activation?activation_cod ...

Having trouble getting a JS file to work with the Laravel Inertia.js and Vue.js3 template

Just getting started with inertia.js and facing an issue. My CSS styles are being applied, but my JavaScript file isn't functioning as expected. I'm working on an admin dashboard using Laravel 9 and vue.js-3 with a custom HTML template. Interes ...

Using React and Redux to update the state of an object with the current state

Upon mounting my component, I make a call to an API and upon success, the state is updated with the following data: { "brief":"No brief given", "tasks":[ { "_id":"5c74ffc257a059094cf8f3c2", " ...

The positioning of Struts2 datepicker

Can the datepicker display be adjusted to move it slightly to the right? <sj:datepicker name="displayEnd" required="true" key="displayEnd-label" displayFormat="dd-mm-yy" timepicker="true" timepickerStepMinute="15" readonly="true ...