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