除了在我的CSS中使用鼠标悬停之外的其他选项
这是我的CSS中的类除了在我的CSS中使用鼠标悬停之外的其他选项,css,Css,这是我的CSS中的类 #ImageBoxNextImage:hover { background-image: url(http://www.eRate.co.za/jquery/imagebox/next_image.jpg); background-repeat: no-repeat; background-position: right bottom; } 我正在使用ASP.NET 2.0和jQuery #ImageBoxNextImage:hover { background-
#ImageBoxNextImage:hover
{
background-image: url(http://www.eRate.co.za/jquery/imagebox/next_image.jpg);
background-repeat: no-repeat;
background-position: right bottom;
}
我正在使用ASP.NET 2.0和jQuery
#ImageBoxNextImage:hover
{
background-image: url(http://www.eRate.co.za/jquery/imagebox/next_image.jpg);
background-repeat: no-repeat;
background-position: right bottom;
}
只有当我将鼠标悬停在我的项目上时,它才会显示下一个_Image.jpg。除了悬停,我还可以使用什么选项。我希望图像始终存在,而不仅仅是悬停
提前谢谢 如果删除:hover,它将始终应用于元素…如果删除:hover,它将始终应用于元素…伪类:hover使此样式仅适用于悬停的元素。Remove“:hover“伪类:hover使此样式仅适用于悬停的元素。移除“:悬停“我不知道您是否要切换图像 如果要在鼠标悬停后切换图像,则需要使用javascript保留图像:
<div id="ImageBoxNextImage" onmouseover="changeBackground(this)">content</div>
function changeBackground(e){
e.style.background = "url(http://www.eRate.co.za/jquery/imagebox/next_image.jpg)";
}
内容
功能更改背景(e){
e、 style.background=“url(http://www.eRate.co.za/jquery/imagebox/next_image.jpg)";
}
如果不需要切换图像,可以删除css类的“:hover”。我不知道是否要切换图像 如果要在鼠标悬停后切换图像,则需要使用javascript保留图像:
<div id="ImageBoxNextImage" onmouseover="changeBackground(this)">content</div>
function changeBackground(e){
e.style.background = "url(http://www.eRate.co.za/jquery/imagebox/next_image.jpg)";
}
内容
功能更改背景(e){
e、 style.background=“url(http://www.eRate.co.za/jquery/imagebox/next_image.jpg)";
}
如果不需要切换图像,可以删除css类的“:hover”。另外,关于标题中的“css jQuery类”。阅读一下您正在定义的CSS规则,它与jQuery或ASP.NET没有多大关系。GregAlso,关于标题中的“CSS jQuery类”。阅读一下您正在定义的CSS规则,它与jQuery或ASP.NET没有多大关系。格雷格