Make
Lycos
you start page
Email & SMS
Search
Flirt & Chat
Web Hosting
Entertainment
Shopping
Weblogs
Tripod
Web Hosting
Domain Names
Virtual Server
eShop
Webmaster Channel
PartnerShop
Directory
Search for
in
Tripod Member Pages
Webmaster Channel
Web
Images
Top 50
Domain names
Find yours now:
go
.co.uk
.com
.net
.org
.biz
.info
Webmaster Home
Glossary
WebStarter
Create your site
Illustrate your site
Publishing your site
Site submission
Tips
Technical Workshops
DHTML
HTML
JavaScript
PHP/MySQL
Search Engine Optimization
Site's Administration
Style sheets
Wap/WML
Graphics Workshops
Design
Digital photography
Paint Shop Pro
Photoshop
Multimedia Workshops
Flash
Music and sounds
Video
Scripts
Quick Reference
HTML 4.0
PHP 4.0
Domain names
Style sheets
Colours
Special characters
Shopping
Webmaster
you are here:
Lycos Home
»
Lycos Webmaster
»
Tips
»
Wavy text
Tips
[
All Tips
]
Wavy text
This is a great effect, not recommended if you are seasick.
Place the following in
<BODY>
:
<body onload="doWave(0)">
Then, where you want:
<script language="JavaScript">
/* script edited by David Gardner (toolmandav@geocities.com)*/
var theText = "
Enter your text here!
";
function nextSize(i,incMethod,textLength)
{
if (incMethod == 1) return (72*Math.abs( Math.sin(i/(textLength/3.14))) );
if (incMethod == 2) return (255*Math.abs( Math.cos(i/(textLength/3.14))));
}
function sizeCycle(text,method,dis)
{
output = "";
for (i = 0; i < text.length; i++)
{
size = parseInt(nextSize(i +dis,method,text.length));
output += "<font style='font-size: "+ size +"pt'>" +text.substring(i,i+1)+ "</font>";
}
theDiv.innerHTML = output;
}
function doWave(n)
{
sizeCycle(theText,1,n);
if (n > theText.length) {n=0}
setTimeout("doWave(" + (n+1) + ")", 50);
}
</script>
<div id="theDiv" align="center">
</div>
Compatibility.
Only works with Internet Explorer 4 and up.
Discover all Webmaster tips.
Send this tip to a friend
Download PDF format
Directory Links
Computing
Software
Internet
Safety and Security