0
我试图更改图像使用CSS精灵,现在,问题是显示:无;显示:block;从jQuery的工作,但图像没有显示(我检查通过萤火其变化的HTML,但图像没有显示在所有)CSS图像精灵 - 更改显示设置图像不显示
$('#logobrandingactive').css({'display': 'block'});
$('#logobranding').css({'display': 'none'});
$('#logobrandingactive').css('opacity','1');
#logobranding {
opacity: 0.5;
display: none;
background-image: url("../images/servicesbranding.png");
background-repeat: no-repeat;
position: absolute;
z-index: 15;
top:175px;
left: 50%;
margin-left: -81px;
width: 162px;
height: 162px;
}
#logobrandingactive {
opacity: 0.5;
display: none;
background-image: url("../images/moservicesbranding.png");
background-repeat: no-repeat;
position: absolute;
z-index: 16;
top:175px;
left: 50%;
margin-left: -81px;
width: 162px;
height: 162px;
}
小提琴?........ – mehulmpt
你可以试试'visible'用'hidden'和'visible'属性 – Wold