1. Home
  2. Computing & Technology
  3. JavaScript

Bubbles

1. Introduction and Sample

clr gif
Join the Discussion

Questions? Comments?

More of this Feature

Obtain the Script Add to Your Page

Give your web page an underwater feel with bubbles slowly making their way up your web page.

The bubbles script has a number of bubbles drifting slowly up the browser window in front of the page content. The page can be scrolled and the bubbles just keeps right on rising in front of whatever part of the page is being viewed.

The bubbles on this web page illustrate the effect generated by the bubbles script. The bubbles will appear at random on the page once it finishes loading and once the bubbles reach the top of the screen they will disappear to be replaced by new bubbles at the bottom of the screen. Scroll the page and the bubbles will continue moving up the screen independently of the page movements behind them. If you make the window smaller then existing bubbles may disappear out of the window but new bubbles will appear at the bottom of the resized window and so eventually all of the bubbles will be visible in the window again.

You can also "pop" the bubbles by clicking on them with the mouse.

If this is the effect that you want to add to your page then the next step is to obtain the script.

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.