|
||
| Inside Technique : Rollovers 101 : 3rd Generation Rollovers The 4.0 browsers added a new generation of rollover effects. Internet Explorer 4.0 leads the way with almost unlimited
rollover flexibility. With Internet Explorer, you can change the appearance of contents of any element in response to the
mouse going over almost anything on the page. In addition, IE 4.0 simplifies anchor rollovers by allowing them to be defined
using CSS. With Internet Explorer 4.0, if you hover over the page list in the left column you will
notice that the color updates. This is specified with a CSS style sheet. Using the CSS hover psuedo-class,
you can change all aspects of the style. For example the following CSS rule would make anchors
change to bold, navy text with a yellow background when the mouse moves over them:
At the end of this article are links to other articles that show you how to create interesting rollover effects with Internet Explorer 4.0. Netscape 4.0 RolloversIn Netscape 4.0, you can use CSS Positioning to add rollover effects to your document. While both Internet Explorer 4.0 and Netscape Navigator 4.0 support CSS Positioning, they use different scripting models to access positioned elements. Once you understand the differences, all effects you can do in Netscape can also be implemented in Internet Explorer. However, the reverse is not always true since Internet Explorer provides a more flexible scripting model. Below is a simple cross-browser rollover effect that uses CSS Positioning. We wrote detection code that runs the appropriate scripts for the browser when the user hovers over the link: Introduction
With the introduction of Internet Explorer 4.0, rollover effects are now limited by the flexibility of CSS. Therefore, all future rollover improvements will mostly focus on simplifying their use. Next, we explain how rollover effects are evolving in Internet Explorer 5.0 and provide links to related articles from around InsideDHTML. Page 1:Rollovers 101 © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |