body,td,th {
font-size: 18px
color: #999
font-weight: bold
}
上面已经设置了td,th文字颜色属性,
<td width="62"><div align="center"><a href=page1.html style="color='#999'cursor:hand" onmouseover="javascript:this.style.color='red'"onmouseout="javascript:this.style.color='#999'">游戏介绍</a></div></td>
这里又设置了颜色属性,不过行内样式优先,可以改成style="color=blue............",这时即:
<style type="text/css">body,td,th {
font-size: 18px
color: #999
font-weight: bold
} <td width="62"><div align="center"><a href=page1.html style="color='blue'cursor:hand" onmouseover="javascript:this.style.color='red'"
onmouseout="javascript:this.style.color='#999'">游戏介绍</a></div></td>
这时颜色body,td,thcolor属性已经不起作用了也可以下面这样,去掉行内style="color:#999",行内的color属性去掉 前边color设置成你要的其实颜色。
<style type="text/css">body,td,th {
font-size: 18px
color: blue
font-weight: bold
}
<td width="62"><div align="center"><a href=page1.html style="cursor:hand" onmouseover="javascript:this.style.color='red'"
onmouseout="javascript:this.style.color='#999'">游戏介绍</a></div></td>
有点乱,希望有帮助!
<html><head>
<title>鼠标放上链接改变网页背景颜色</title>
<meta http-equiv="Content-Type" content="text/html charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
function goHist(a)
{
history.go(a)
}
</script>
</head>
<body>
<center>
<h2>鼠标放到相应链接上看看!</h2>
<table border=1 borderlight=green style="border-collapse: collapse" cellpadding="5" cellspacing="0">
<tr><td align=center>
<a href="#" onMouseOver="document.bgColor='skyblue'">天空蓝</a>
<a href="#" onMouseOver="document.bgColor='red'">大红色</a>
<a href="#"onMouseOver="document.bgColor='#0066CC'">清新蓝</a>
</td></tr>
</table>
</center>
</body>
</html>