SHARE
Facebook X Pinterest WhatsApp

So, You Want A Wave, Huh?

Written By
thumbnail
Joe Burns
Joe Burns
Jan 4, 2005

Use these to jump around or read it all…


[Examples]
[Parameters]

The Wave Filter is a great effect that will wave either text or an image, as long as that text or image sits inside of a division or SPAN.

The Wave Filter acts a lot like a Style Sheet command, as do the other static text filters. I just broke this one out from the other text filters because there are so many more settings to play with.



Examples

Let me give you an example of what this filter can do:

The code:


<DIV STYLE=”width:350;height:70;filter:wave(strength=4, freq=2, lightstrength=40, add=0, phase=20)”>
<FONT SIZE=+3>Here’s What You Get.</FONT></DIV>


…gives you this:

Here’s What You Get.

Now, let’s apply the same parameters to an image. The code looks like this:


&ltDIV STYLE=”width:350;height:70;filter:wave(strength=4, freq=2, lightstrength=40, add=0, phase=120)”>
<IMG src=”https://assets.htmlgoodies.com/uploads/2021/04/eggs.gif”></DIV>


…and gives you this:

Make a point of keeping all of the Style Sheet and parameter codes in the <DIV> on the same line. If you don’t, you might not get the effect.



Parameters

The real fun of this filter is setting the parameters to differing levels of intensity. Go nuts! Here’s what each one means and how you can set it. Just follow the format in the code examples above.


  • add: Do you want the original image added to the mix? Use 0 for no and 1 for yes.
  • enabled : Is the effect turned on or not? Use 0 for no and 1 for yes.
  • freq: How many waves do you want?
  • lightStrength: How much light intensity do you want?
  • phase: Sets the phase where the waving begins. If you try different numbers, you’ll set the difference.
  • strength: How strong do you want the filter?

Keep in mind that this effect only works on IE browsers 4.0 or better, but feel free to use the commands regardless. Browsers that do not understand the commands will happily ignore them.

 


Enjoy!

 


[Examples]
[Parameters]

Recommended for you...

The Revolutionary ES6 Rest and Spread Operators
Rob Gravelle
Aug 23, 2022
Ahead of Time (AOT) Compilation in Angular
Tariq Siddiqui
Aug 16, 2022
Converting a JavaScript Object to a String
Rob Gravelle
Aug 14, 2022
Understanding Primitive Type Coercion in JavaScript
Rob Gravelle
Jul 28, 2022
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.