Texto Ondulado em JavaScript
- Código:
<script>
/*
Roller Coaster Script-
By Website Abstraction
Over 200+ free scripts here!
*/
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--
}
}
//Change below text to your won
rollertext("Teste de texto ondulado pela decorrência")
</script>
Teste de texto ondulado pela decorrência = Substitua pelo texto que recebera a ondulação.
Resultado: Este script faz com que o texto digitado tenha uma ondulação por todo o seu percurso.