0
我想爲背景位置X軸設置動畫,但將Y軸保留爲「底部」。僅爲背景位置X軸設置動畫
我已經能夠使用動畫X軸:
$('#imageholder').animate({'background-position' : mousePosX});
然而,這種復位這對我的CSS文件設置爲bottom
Y位置。
我曾嘗試結合mousePosX
和bottom
,如:
$('#heroimageholder').animate({'background-position' : mousePosXPercent + " bottom"});
或:
var bgpos = mousePosXPercent + " bottom";
$('#heroimageholder').animate({'background-position' : bgpos});
沒有結果。
有沒有辦法使.animate()
工作與多個CSS值?