
Format the navigation bar text 319
Add a rollover effect
Now you’ll add a rollover effect so that the background color of the
navigation bar blocks change whenever the mouse pointer passes over one
of the links. To add a rollover effect, add a new rule that contains the
:hover pseudo-class.
1.
Open the cafe_townsend.css file.
2.
Select the entire .navigation rule.
3.
Copy the text (Edit > Copy).
ABO
U
T.
..
About the :hover pseudo-class
A pseudo-class is a means of affecting certain elements in an HTML
document, based not on the HTML code of the document itself, but on other external conditions applied
by the web browser. Pseudo-classes can be dynamic, in the sense that an element on the page may
acquire or lose the pseudo-class while a user interacts with the document.
The :hover pseudo-class affects a change in a formatted page element when the user holds the mouse
over the element. For example, when the :hover pseudo-class is added to the .navigation class style
(.navigation:hover) to create a new rule, all text elements that the .navigation rule formats change
according to the .navigation:hover rule’s properties.
000_ExploringStudio.book Page 319 Tuesday, August 30, 2005 9:30 AM
Summary of Contents for STUDIO 8-EXPLORING STUDIO 8
Page 1: ...Exploring Studio 8...
Page 8: ......
Page 42: ...42 Learning Studio...
Page 134: ...134 Web Development Workflow...
Page 136: ......
Page 162: ...162 Tutorial Creating Page Mock ups...
Page 182: ......
Page 194: ...194 Tutorial Handling Photographs...
Page 254: ...254 Tutorial Building Your First Flash Application...
Page 266: ...266 Tutorial Building a Video Player Flash Professional only...
Page 268: ......
Page 294: ...294 Tutorial Adding Content to Pages...
Page 324: ...324 Tutorial Formatting Your Page with CSS...
Page 332: ...332 Tutorial Publishing Your Site...
Page 342: ...342 Tutorial Setting Up Your Website for Contribute Users...
Page 350: ...350 Index...