Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

329
Views
How Can I Make Text Animation Effect, Hello World to HW in JavaScript or CSS?

How Can I Make Text Animation Effect, Hello World to HW in JavaScript or CSS?

First Text is Hello World! At last, become HW, with disapearing other letters.

Hello World!

↓

Hell World!

↓

He Wld!

↓

HW

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

enter image description here

<script>
export default {
    name:"Introduction",
    data() {
        return {
            timer:1,
        }
    },

    mounted() {
      this.deathLoop = null
      this.deathLoop = setInterval(()=>{
        this.timer+=1
        if(this.timer>4) this.timer=1
      },1000)
    },
}
</script>
<style scoped>
.Introduction{
    padding-top: 60px;
    height: 100%;
    width: 100%;
    color: #333;
    font-size: 20px;
}
span{
    font-size: 30px;
    height: 20px;
    line-height: 20px;
    margin-top: 10px;

}
</style>
<template>
  <div class="Introduction">
     <span >H</span>
     <span v-show="timer<4">e</span>
     <span v-show="timer<3">l</span>
     <span v-show="timer<3">l</span>
     <span v-show="timer<2">o</span>
     <span>&nbsp;&nbsp;</span>
     <span >W</span>
     <span v-show="timer<3">o</span>
     <span v-show="timer<3">r</span>
     <span v-show="timer<4">l</span>
     <span v-show="timer<4">d</span>
     <span v-show="timer<4">!</span>
  </div>
</template>

Check the image. Maybe it's what you want. Code by Vue.js2 and you can copy it in pure Javascript

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!