可能是重复问题:
jQuery + RGBA color animations
嘿,
我想在悬停时改变rgba值的不透明度,但是不透明度保持为0.07。也许你可以帮我找到错误。
CSS(IE hacks在单独的文件中 - 不需要在此处提及)
.boxcaption{
float: left;
position: absolute;
height: 100px;
width: 100%;
background: rgb(255, 144, 11);
background: rgba(255, 144, 11, 0.7);
}
JS
var thumbslide = $('.boxgrid.captionfull').click(function() {
$('.boxgrid.captionfull.clicked').removeClass('clicked').children('.cover').stop().animate({top: 230, background: 'rgba(255, 144, 11, 0.7)'}, 350);
$(this).toggleClass('clicked').children('.cover').stop().animate({top: 0, height:"230px", background: 'rgba(255, 144, 11, 1)'}, 350);
});
zoom:1
或display:inline-block
添加到 CSS 中是否有帮助?我在想这个元素是否因为在 IE 中没有 "hasLayout" 而出现了问题? - scunliffe