Css 在HTML提交按钮的鼠标悬停上显示工具提示
我的JSP页面上有一个简单的链接,如下所示Css 在HTML提交按钮的鼠标悬停上显示工具提示,css,Css,我的JSP页面上有一个简单的链接,如下所示 <a href="" title="Press the button to delete the row." class="icon-2 info-tooltip"></a> 当鼠标悬停在链接上时,默认图标将替换为以下css类 a:hover.icon-2 { background: url(../images/table/table_icon_2.gif) 0 -24px; /*Displays icon
<a href="" title="Press the button to delete the row." class="icon-2 info-tooltip"></a>
当鼠标悬停在链接上时,默认图标将替换为以下css类
a:hover.icon-2
{
background: url(../images/table/table_icon_2.gif) 0 -24px;
/*Displays icon on mouse hover.*/
}
实际显示工具提示的css类如下所示
a.icon-2
{
background: url(../images/table/table_icon_2.gif) no-repeat;
display: block;
float: left;
height: 24px;
margin: 0 8px 0 0;
width: 24px; /*Displays a default icon*/
}
#tooltip
{
background-color: #8c8c8c;
border: 1px solid #767676;
color: #fff;
font-family: Arial;
font-size: 10px;
font-weight: normal;
opacity: 0.85;
padding: 0 5px;
position: absolute;
text-align: left;
z-index: 3000;
}
现在,我需要在鼠标悬停的HTML提交按钮上显示具有相同图标的相同工具提示。如何显示它?请尝试
而不是a:hover.icon-2
。icon-2:hover
以相同的方式显示,但对提交
按钮使用CSS选择器,而不是a
链接。。。