SiteExperts.com Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : Steve's Behaviors : fade Behavior

The fade behavior makes it easy to use the blend transition filter to fade elements into view. In Internet Explorer 5.0, the paragraph below fades into view. In all other browser, the paragraph is properly displayed and the behavior is ignored.

This is the FADE.htc behavior. It uses the property duration to specify how long the fade into view should take, the offStart to specify how long after the page to load before starting the fade, or the fade can be manually started by calling the fadeo() method on the element. When complete, the onFadeDone event fires on the element.

The above paragraph is wrapped in a DIV and is associated with the move behavior as follows:

<div id=fd1 
     style="behavior: url(fade.htc); 
            width: 100%; 
            background: lightblue; 
            border: 1 black solid" 
     offStart=3000 
     duration=10>
  <p>...paragraph...
</div>

Page 1:Steve's Behaviors
Page 2:move Behavior
Page 3:fade Behavior
Page 4:bubble Behavior
Page 5:type Behavior
Page 6:switch Behavior
Page 7:over Behavior
Page 8:float Behavior