코드 - html 타이핑이 되는 모션 스크립트입니다. - css .typing { position:relative; opacity:0; } .typing.on:after { content:''; position:absolute; top:50%; transform:translateY(-50%); right:-2px; width:1px; height:18px; background-color:#000; opacity:0; animation:cursor .4s steps(2) infinite; } @keyframes cursor { 0 { opacity:0; } 100% { opacity:1; } } - script $(window).on('load', function(){ $('.typing').each(function(){ var txt = $(this).text(); var hei = $(this).outerHeight(); $(this).css({'display':'inline-block'}).html('' + txt + ''); }); typing(); }); function typing(){ $('.typing').each(function(){ var spd = 100;// 타이핑 속도 var txt = $(this).find('.dataTxt').text(); var len = txt.length; var stop = (len + 1) * spd; $(this).addClass('on'); $(this).find('.reTxt').remove(); $(this).append(''); var $this = $(this).find('.reTxt'); var count = 0; var inter = setInterval(function(){ count ++; $this.text(txt.substring(0, count)); $this.closest('.typing').css({'opacity':'1'}); }, spd); setTimeout(function(){ clearInterval(inter); $this.text(txt); setTimeout(function(){ $this.closest('.typing').removeClass('on'); }, 500); }, stop); }); }