글자에 효과를 부여합니다. 데모를 눌러 확인하세요
| Script Example |
<script> var fs=1 var direction="right" function rollertext(whichone){ var thetext=whichone for (i=0;i<thetext.length;i++){ document.write(thetext.charAt(i).fontsize(fs)) if (fs<7&&direction=="right") fs++ else if (fs==7){ direction="left" fs-- } else if (fs==1){ direction="right" fs++ } else if (fs>1&&direction=="left") fs-- } } rollertext("안녕하세요 홈제작바이블입니다.감사합니다.") </script> | | |
스크립트는 body 태그 안 원하는 위치에 삽입하시고 출력되는 내용은 빨간색 부분에서 수정하세요
| |