Current location - Recipe Complete Network - Complete cookbook - When the mouse moves to the menu bar, the background color changes and the font color changes. Ask how to write these codes and where to write them! ! ! ! !
When the mouse moves to the menu bar, the background color changes and the font color changes. Ask how to write these codes and where to write them! ! ! ! !
Write the following passage in the head, and then call it in the body.

# nav { margin:0 auto; Background: # 666699; }

#nav{ list-style-type:none}

# nav Li { float:left; }//Horizontal menu, just hold it vertically.

# Ali Navigation {display:block;; Color: # 000000; Background color: # FFFF00 Text-Decoration: None; Text alignment: centered; Font size:16px;

Fill top: 4px width: 92px height: 22px left margin: 2px}

# navali: hover {background-color: # 00fffcc; Color: # FF0000}

You can set color values here at will. )

The application is as follows:

In the menu area you want to set, write it like this.

& ltul id = " nav " & gt

& lt Li> & ltahref = "index.htm"> Home Page

& lt Li> & ltahref = "index.htm"> name.

& lt Li> & ltahref = "index.htm"> name.

& lt/ul & gt;

Just apply it to your body.