Navigate
Sponsors
|
Menu Rollover Effect using blend TransitionIntroductionThis guide shows you how to add a transition effect to the rollover menu we created in Menu Rollover with CSS. You will need to read that tutorial if you need to understand how to build the menu because we will only post the code here without an explanation. Tested in As this code uses filters, it is of course IE only at the moment :-( Menu CodeThe menu we are going to add the transition effect to was created with a HTML list using CSS to control the presentation to achieve the rollover look. The result of that tutorial is shown below. To add the transition effect we need to add three components:
Transition FilterThe transition filter is a short line of CSS which we place into the overall link styles which we specified in Step 4 of the Menu Rollover guide:
#list-menu a { Javascript FunctionPlace the following javascript function into the <head> of your document (or in an external linked javascript file).
<script type="text/javascript"> Activating the rolloverWe then need to activate the transition effect when someone mouseovers the links. We do this using the onmouseover and onmouseout events which we place into each link in the menu.
<div id="list-menu"> This results in the following: Note: Although these filters currently only work in IE your menu will still display just as normal in other browsers so at least 85%* of your visitors will be able to view this effect. Go to the HTML List version... *Source: BrowserNews. |