代码:
$("#previous_image").click(function(){
$("#images").animate({"right": "+=250px"}, "slow");
return false;
});
当我运行 console.log 时,我进入了 click 功能,所以这不是问题。看来我的 div 只是不想动画。
我的 CSS 代码 (SASS)
#images_container{
display: block;
margin-left: 39px;
width: 630px;
height: 81px;
overflow: hidden;
}
#images{
display: block;
width: 1500px;
min-width: 650px;
img{
margin-top: 7px;
display: inline-block;
height: 66px;
cursor: pointer;
filter: url(svg/filters.svg#grayscale);
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Google Chrome & Safari 6+ */
transition: filter .3s ease-in-out;
-moz-transition: filter .3s ease-in-out;
-webkit-transition: filter .3s ease-in-out;
transition: -webkit-filter .3s ease-in-out;
-moz-transition: -webkit-filter .3s ease-in-out;
-webkit-transition: -webkit-filter .3s ease-in-out;
@include transition-property(-webkit-filter);
@include transition-duration(.3s);
@include transition-timing-function(ease-out);
&:hover{
filter: none;
-webkit-filter: grayscale(0);
}
}
有什么硬仗吗?吓死我了
干杯。W。