这是我的.animate功能
<script>
$(document).ready(function(){
$('#slide').click(function(){
$('#2guns').animate({right: 500},10000);
});
});
</script>
这是我正在制作动画的元素
<div class="content">
<button id="slide">slide</button>
<img src="/home/varun/Documents/Crown/images/line.png" id="2guns" STYLE="position:absolute;left:1293px;">
</div>
没有属性
,它完美无缺left:1293px;
任何解决方案?
答案 0 :(得分:1)
<div class="content">
<button id="slide">slide</button>
<img src="/home/varun/Documents/Crown/images/line.png" id="2guns" STYLE="position:absolute;left:1293px;">
</div>
$(document).ready(function(){
$('#slide').click(function(){
$('#2guns').animate({left: 200},10000);
});
});
答案 1 :(得分:0)
答案 2 :(得分:0)
为什么要留下,请注明......
我试着用它做得很好......
<div class="content">
<button id="slide">slide</button>
<img src="/home/varun/Documents/Crown/images/line.png" id="2guns" STYLE="position:absolute; right:0px;">
</div>