Typewriter Animation in CSS

Sdílet
Vložit
  • čas přidán 18. 07. 2022
  • No Javascript - Just pure HTML & CSS. Here's how to create a typewriter effect for websites.
    You'll find 2 different typing animation styles. One like typing and step by step and one pretty smooth and fluid.
    Here's where I s̶t̶o̶l̶e̶ inspired this from
    codepen.io/denic/pen/GRoOxbM
    css-tricks.com/snippets/css/t...
    #css #html #typewriter
  • Jak na to + styl

Komentáře • 76

  • @ryanpatel2001
    @ryanpatel2001 Před rokem +17

    Brilliant. Simple, and straight to the point. Thanks

  • @victormarinviloria633
    @victormarinviloria633 Před 11 měsíci +6

    This is such a creative way to do it! Thanks for sharing!

  • @sirphiriladki5531
    @sirphiriladki5531 Před 11 dny

    That last line is amazing😂

  • @jotanews1776
    @jotanews1776 Před rokem

    top-tier content, really glad i found this gem.

  • @joeyreyes9666
    @joeyreyes9666 Před 3 měsíci

    Beautiful and way easier than I thought. Thank you! :)

  • @nikhilgupta6415
    @nikhilgupta6415 Před 2 měsíci

    Brilliant. Simple and easily done.

  • @SeriousSnake
    @SeriousSnake Před 6 měsíci

    Terrific! I could not get the typing bar, but that is what I wanted. Thanks for the video!

  • @aronbarbosag3439
    @aronbarbosag3439 Před 9 měsíci +1

    bro, i'm not english speaker, but your video is the only one that i really learn how to do this effect. sorry for my bad english. good job bro ! keep going the job

  • @pramana47
    @pramana47 Před 2 měsíci

    this works like a charm, thx man!

  • @ujjjdgabehdy6147
    @ujjjdgabehdy6147 Před 2 měsíci

    thanks! thats exacly what i was looking for! very simple

  • @yordanov5.0
    @yordanov5.0 Před 3 dny

    Brotha you are legend.

  • @adriansantos2403
    @adriansantos2403 Před 10 dny

    thank you!

  • @chrisambatti
    @chrisambatti Před 4 měsíci

    What a cool way to teach

  • @muhammadumarsotvoldiev8768
    @muhammadumarsotvoldiev8768 Před 5 měsíci

    Thank you very much!

  • @CrazyTajdine
    @CrazyTajdine Před měsícem

    this like is for the cat
    and this heart

  • @sihxies2037
    @sihxies2037 Před rokem +3

    Simple, Straightforward and easy to understand, Thankss for the info. Btw I liked, how's the cat

    • @cluelessexpert
      @cluelessexpert  Před rokem +3

      he got the finest tuna available on amazon , thx for asking

  • @JoshDaniel7
    @JoshDaniel7 Před 16 dny

    Any idea how to make this responsive after the animation?

  • @karimahmed2510
    @karimahmed2510 Před 6 měsíci +1

    how to make it write 3 words without js ??

  • @tommytanti1776
    @tommytanti1776 Před 10 měsíci +2

    How to loop it?

  • @user-fn4sz9nj4k
    @user-fn4sz9nj4k Před 29 dny

    amm.. why does the cursor goes to the right side side of the screen??

  • @stavroskefaleas6320
    @stavroskefaleas6320 Před 5 měsíci

    Is there any way I can convert this to an animated gif?

  • @bavouille
    @bavouille Před 2 měsíci

    goes the cat well ? good video thx bro !
    (idk why but the cursor disappear after wrote the text, if u have an issue ?)

  • @kimuthgemink
    @kimuthgemink Před 7 měsíci

    kalau dibuat looping tapi delay dulu bisa ga mas? caranya gimana?

  • @Owen-by7db
    @Owen-by7db Před 6 měsíci

    I love your video

  • @shehiriron69
    @shehiriron69 Před rokem +2

    Why doesn't the animation work?

  • @chameleonnn
    @chameleonnn Před 10 měsíci

    wow so simple

  • @sebastian9192
    @sebastian9192 Před rokem +14

    hello, what about if text wraps and you have more lines of text??

    • @AlanDanielx
      @AlanDanielx Před 7 měsíci +1

      he just made a one line solution lol

    • @ci2179
      @ci2179 Před měsícem

      Nowrap is not put, cursor denotes as border right 5 px assign while minimize ur screen... Border puts entire line... Nowrap necessary for this animation

  • @coding-id6dh
    @coding-id6dh Před 4 měsíci

    i am doing the same way. but it's not working!

  • @bakardembadia4361
    @bakardembadia4361 Před 5 měsíci

    how do i make it work with a paragraph ? I thought about having each line separated and copy past the css for each of them but idk how to delay the animation for each line so they do not happen at the same time

    • @nokky070
      @nokky070 Před 3 měsíci

      Ehhh it isn't perfect but what i done is i removed the white-space in the css

  • @RIP123
    @RIP123 Před 10 měsíci

    Cool but is it possible to make it responsive?

  • @slach9056
    @slach9056 Před 11 měsíci

    do you guys have any idea about how can i turn this animation into a hover?
    .giroscopio{
    width:100%;
    white-space: nowrap;
    overflow: hidden;
    border-right: solid 2px;
    animation:
    typing 2s steps(18),
    cursor .4s step-end infinite alternate;
    }
    @keyframes cursor {
    50% {border-color:transparent}
    }
    @keyframes typing {
    from { width:0 }
    }
    i want to add something like:
    father-element:hover .giroscopio {execute the animation}

    • @Kk-ql8rz
      @Kk-ql8rz Před 3 měsíci

      just put the animation property in hover state

  • @nathanbrown2625
    @nathanbrown2625 Před měsícem

    is there a way to remove the cursor after it completes going over the intended text?

  • @SL_Web_Hero
    @SL_Web_Hero Před 5 měsíci +1

    cool,but I can,t center this animated text.

  • @JawadKhan-ky6yt
    @JawadKhan-ky6yt Před rokem +1

    Liked for your cat.

  • @prerit714
    @prerit714 Před rokem +1

    You asked like? Imma give you a wholeass subscribe

  • @ci2179
    @ci2179 Před měsícem

    Its not working for me... What mistakes i made i dont know

  • @user-gg7ki3rn4d
    @user-gg7ki3rn4d Před 9 měsíci

    bro, is there a way to put a delay like 4s then loop again from the start?

    • @cluelessexpert
      @cluelessexpert  Před 9 měsíci +4

      I asked the Bing AI and it gave me this and it seems to work. just replace this for everything after line 11
      animation:
      typing 6s steps(15, end) infinite,
      cursor .4s step-end infinite alternate;
      }
      /* cursor blinking */
      @keyframes cursor {
      50% { border-color: transparent }
      }
      /* typing effect */
      @keyframes typing {
      0% { width: 0 }
      33.33% { width: 100% } /* typing ends */
      100% { width: 100% } /* pause for remaining time (4s) */
      }

    • @user-gg7ki3rn4d
      @user-gg7ki3rn4d Před 8 měsíci

      @@cluelessexpert thanks bro its working now =)

  • @bw0ns4mdi35
    @bw0ns4mdi35 Před rokem

    When I put the steps part, the animation doesn't work. I rmeove the steps and it does work. But I'd really like to make the steps animation. What would be the problem?

    • @cluelessexpert
      @cluelessexpert  Před rokem

      can you elaborate that more? Maybe you misspelled the animation names or something with the width

    • @bw0ns4mdi35
      @bw0ns4mdi35 Před rokem

      ​@@cluelessexpert I already fixed it. Thanks!!

    • @andro5283
      @andro5283 Před 2 měsíci

      how did you achieve the fix for this?
      @@bw0ns4mdi35

  • @nielanthonyflores1714

    How about changing text after typing

    • @cluelessexpert
      @cluelessexpert  Před rokem

      if you don't mind using scss try maybe try this codepen.io/geoffgraham/pen/MWVmxQp

  • @user14NotFound
    @user14NotFound Před 5 měsíci +1

    how to make an animation of typing and deleting, then there is writing. example type: my hobby is fishing. and deleting fishing. then add to it playing football. like that, if you can please make it

    • @jonteel0
      @jonteel0 Před 3 měsíci

      .typing-animation::after {
      content: '';
      animation: typing 5s steps(40) forwards, deleting 2s steps(40) 5s forwards;
      overflow: hidden;
      display: inline-block;
      vertical-align: bottom;
      }
      @keyframes typing {
      from {
      width: 0;
      }
      to {
      width: 100%;
      }
      }
      @keyframes deleting {
      from {
      width: 100%;
      }
      to {
      width: 0;
      }
      }
      document.addEventListener('DOMContentLoaded', function () {
      var div = document.querySelector('.typing-animation');
      var newText = 'playing football.';
      setTimeout(function () {
      div.setAttribute('data-text', newText);
      div.style.animation = 'typing 5s steps(40) forwards';
      }, 7000); // Adjust the timing according to your need
      });

  • @javierserna6631
    @javierserna6631 Před rokem

    good video, but not working infinite property, thanks

  • @PatrikRasch
    @PatrikRasch Před 8 měsíci

    Lmao wish I could donate 1000 likes to feed that stronk cat

  • @Techno_2709
    @Techno_2709 Před 8 měsíci

    source code pls

  • @dr.manthanos7781
    @dr.manthanos7781 Před rokem

    is it any way to do this without the typing bar?

    • @cluelessexpert
      @cluelessexpert  Před rokem

      You mean the line on the right side?

    • @dr.manthanos7781
      @dr.manthanos7781 Před rokem

      @@cluelessexpert yeah, i mean that bar that acts like a cursor while typing

    • @cluelessexpert
      @cluelessexpert  Před rokem

      Yeah, just don’t add it or make the color transparent

  • @MTHOVTER
    @MTHOVTER Před 2 měsíci

    Para los que quieran mejorarlo y poder crear textos de diferentes tamaños sin perder el efecto:
    - En tu codigo CSS escribe:
    :root {
    --typing-steps: 0;
    }
    - Modifica dentro de .text{}:
    .text{
    animation:
    typing 2s steps(var(--typing-steps)),
    cursor .4s step-end infinite alternate;
    }
    - Por ejemplo, dentro de tu index.html puedes crear diferentes textos usando:
    Hola
    Hola gente :D
    Obviamente el numero de pasos debe ser el equivalente al numero de caracteres que tiene la oración (Contando caracteres en blanco)

  • @emni-tech
    @emni-tech Před 10 měsíci

    redid everything like you did in the video, the animation doesn't happen at all :(

    • @cluelessexpert
      @cluelessexpert  Před 10 měsíci

      can you give more details my g, maybe we'll solve it

  • @rohanrajput_9
    @rohanrajput_9 Před 9 měsíci

    I did one comment too, feed your cat

  • @louisedemeanbalili5601
    @louisedemeanbalili5601 Před 4 měsíci

    DI MUGAnA HOY YAWA

  • @AnuragSingh-nx4ct
    @AnuragSingh-nx4ct Před 8 měsíci

    Only print one line

  • @damonwu9658
    @damonwu9658 Před rokem

    This is a styled-components version:
    const cursor = keyframes`
    50% {
    border-color: transparent;
    }
    `;
    const typing = keyframes`
    from {
    width: 0;
    }
    `;
    const typeWriterAnimation = (props) =>
    css`
    ${typing} 4s steps(${props.steps}), ${cursor} 4s step-end infinite alternate;
    `;
    const TypeWriterWrapper = styled.p`
    font-size: 1rem;
    letter-spacing: 0.05rem;
    font-family: monospace;
    border-right: 6px solid;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    animation: ${typeWriterAnimation};
    `;

  • @Elite_-ie8bs
    @Elite_-ie8bs Před 6 měsíci

    I wish i could like this vid multiple times to feed your cat, but youtube onyl allows 1 like....
    Edit:- i made some typo...

  • @Technical_yaar
    @Technical_yaar Před rokem +6

    I didn't get it can anybody explain?

  • @busimo
    @busimo Před 2 měsíci

    I thought bro said kindly donate 1 lac

  • @moonpet786
    @moonpet786 Před 2 měsíci

    I am gonna feed your cat with 100 likes