Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 在HTML提交按钮的鼠标悬停上显示工具提示_Css - Fatal编程技术网

Css 在HTML提交按钮的鼠标悬停上显示工具提示

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

我的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 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
链接。。。