我正在尝试在单个悬停中更改图像和文本颜色。如果我将图像悬停在图像上,图像和文本都会被更改,但如果我将鼠标悬停在文本上,则文本将会改变。
HTML:
<td class="iconmenubg "><a href="projectupdate.xhtml" >
<img src="../images/leftmenu/executionprogress_normal.png" onmouseover="this.src='../images/leftmenu/executionprogress_selected.png'" onmouseout="this.src='../images/leftmenu/executionprogress_normal.png'" />
Execution Progress</a>
</td>
CSS:
.iconmenubg a {
padding-bottom: 15px !important;
text-decoration: none !important;
font-size:12px !important;
color:#a5aaad !important;
margin-bottom: 10px;
margin-left: 34px;
}
.iconmenubg a:hover{
text-align:center !important;
text-decoration: none !important;
color: #ffffff !important;
font-size:12px !important;
}
当我将鼠标悬停在图片或文本上时,如何将图片和文字更改?