回答編集履歴

1

調整

2022/11/25 01:14

投稿

yambejp
yambejp

スコア114843

test CHANGED
@@ -1 +1,22 @@
1
1
  transformはanimateではなくcssで指定してください
2
+
3
+ ```javascript
4
+ <script>
5
+ $(function(){
6
+ $(".slide-box").css({transform: "translateX(100px)"})
7
+ .delay(1000).queue(function(){$(this).css({transform: "translateX(0px)"}).dequeue();})
8
+ .delay(1000).queue(function(){$(this).css({transform: "translateX(100px)"}).dequeue();})
9
+ .delay(1000).queue(function(){$(this).css({transform: "translateX(0px)"}).dequeue();})
10
+ });
11
+ </script>
12
+ <style>
13
+ .slide-box{
14
+ transition: transform 1s linear;
15
+ }
16
+ </style>
17
+ <ul class="slide-box">
18
+ <li><a href="#"><img src="#" alt="1"></a></li>
19
+ <li><a href="#"><img src="#" alt="2"></a></li>
20
+ <li><a href="#"><img src="#" alt="3"></a></li>
21
+ </ul>
22
+ ```