We have mentioned some situations about the underline of link text. How can we implement the shadow of link text? When you move the mouse over the link text, the link text can change the color and produce a certain shadow to create a three-dimensional effect, which must be quite eye-catching.
CSS code for link text shadow effect:
The code is as follows: |
Copy code |
Ul, li {margin: 0px; padding: 0px; list-style-type: none ;} # Nav {font-family: Verdana, "", Arial ;} # Nav li {float: left; margin-left: 30px ;} # Nav span {display: none ;} # Nav a {font-size: 12px; font-weight: 800; color: # c00; text-decoration: none; display: block ;} # Nav a: hover {color: #999; top: 1px; left: 1px; position: relative ;} # Nav a: hover span {display: block; top:-1px; left:-2px; position: absolute; color: #000; cursor: pointer ;}
|
Link text shadow effect XHTML code: <div id = "nav">
<Ul>
<Li> <a href = "http://www.111cn.net/"> 52CSS HomePage <span> 52CSS HomePage </span> </a> </li>
<Li> <a href = "http://www.111cn.net/"> Div + CSS tutorial <span> Div + CSS tutorial </span> </a> </li>
<Li> <a href = "http://www.111cn.net/"> CSS layout instance <span> CSS layout instance </span> </a> </li>
<Li> <a href = "http://www.111cn.net/"> CSS2.0 tutorial <span> CSS2.0 tutorial </span> </a> </li>
<Li> <a href = "http://www.111cn.net/"> CSS online manual <span> CSS online manual </span> </a> </li>
<Li> <a href = "http://www.111cn.net/"> Web standards <span> Web standards </span> </a> </li>
<Li> <a href = "http://www.111cn.net/"> XHTML tutorial <span> XHTML tutorial </span> </a> </li>
</Ul> </div>