日期:2014-05-17  浏览次数:20630 次

鼠标移过文字背景颜色
<td width="70" height="25" align="center" style="color:#73b1d6" onMouseOver="this.style.background='#fcf9ef'" onmouseout="this.style.background=''">

这个好像高了一点.而且是TD的那种.有没有像湖南卫视www.hunantv.com左边那样子的.鼠标移上去只是文字背景变色的代码.谢谢.


------解决方案--------------------
<font onMouseOver="this.style.background='#fcf9ef'" onmouseout="this.style.background=''"> 你的文字</font>
------解决方案--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
a { background:#fff; color:#930}
a:hover { background:#006; color:#930}
</style>
</head>

<body>
<p><a href="#">热点</a></p>
<p><a href="#">栏目</a> </p>
</body>
</html>