shots(broiler)mp3下载:这段CSS怎么没效果

来源:百度文库 编辑:高校问答 时间:2024/04/29 16:17:45
我给下面的表格定义了样式,怎么什么效果都没有?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>The main page of the 郭宇权</title>
<style type="text/css">
<!--
a.e:link {
font-size: 10px;
font-weight: normal;
color: #CCCCCC;
background-color: #CCCCCC;
border: 1px dashed #FFFFFF;

}
a.e:visited {
font-size: 14px;
font-weight: bold;
color: #CCCCCC;
background-color: #999999;
border: 1px dashed #FFFFFF;
}
a.e:hover {
color: #FFFF00;
background-color: #000000;
border: 1px solid #FFFF00;
}
-->
</style>

</head>
<body style="background-image:url(0-1.jpg); background-repeat:no-repeat">
<table class="e" width="237" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="237" height="85"> </td>
</tr>
</table>
</body>
</html>

你定义的CSS隶属于链接css,只有<a class=e></a>才能实现鼠标放上变色。如果你要表格变色,必须在表格的<td>里加上onmouseover来改变它的颜色,示例如下:

<td bgcolor='#ffffff' onmouseover="this.style.backgroundColor='#000000';" onmouseout="this.style.backgroundColor='#ffffff';"></td>