Mouse over change the effect of text must be a lot of friends have encountered it, this article for you to introduce how the CSS is achieved, interested friends can understand the next
Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv=" Content-type " Content= "text/html; charset=gb2312 "/>
<title> Mouse rollover text </title>
<style>
#Menu {
width:500px;
margin:50px Auto;
border:1px solid #CCC;
Overflow:hidden;
}
#Menu ul {
margin:0;
padding:0;
List-style:none;
}
#Menu li {
width:100px;
height:22px;
line-height:22px;
Float:left;
Overflow:hidden;
Text-align:center;
}
#Menu a {
width:100px;
Float:left;
Overflow:hidden;
}
#Menu span {
Display:block;
margin-top:-22px;
}
#Menu a:hover {
padding-top:22px;
}
</style>
<body>
<ul id= "menu" >
<li><a href= "#" ;;span>home</span> Home </a></li>
<li><a href= "#" ><span>NEWS</span> News </a></li>
<li><a href= "#" ><span>ABOUT</span> about </a></li>
<li><a href= "#" ><span>CONTACT</span> contact </a></li>
<li><a href= "#" ><span> photos </span>PHOTO</a></li>
</ul>
</body>