teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

記述を修正しました。

2021/10/15 06:26

投稿

cc-taishi
cc-taishi

スコア3

title CHANGED
File without changes
body CHANGED
@@ -49,7 +49,7 @@
49
49
  $(".video").play();
50
50
  }).then(function(){
51
51
  //3番目:ビデオ再生が終わったら、ビデオが消える
52
- $("#video").css("opacity", "0");
52
+ $(".video").css("opacity", "0");
53
53
  });
54
54
  });
55
55
  </script>

3

記述を修正しました。

2021/10/15 06:26

投稿

cc-taishi
cc-taishi

スコア3

title CHANGED
File without changes
body CHANGED
@@ -38,17 +38,17 @@
38
38
  <script>
39
39
  $(function() {
40
40
  const promise = new Promise(function(resolve, reject){
41
- //:ローディング画像を3秒後にフェードアウト
41
+ //1番目:ローディング画像を3秒後にフェードアウト
42
42
  setTimeout(function() {
43
43
  $('.loading-img').fadeOut();
44
44
  resolve();
45
45
  }, 3000);
46
46
  });
47
47
  promise.then(function(){
48
- //:ローディング画像がフェードアウト後にビデオが再生
48
+ //2番目:ローディング画像がフェードアウト後にビデオが再生
49
49
  $(".video").play();
50
50
  }).then(function(){
51
- //:ビデオ再生が終わったら、ビデオが消える
51
+ //3番目:ビデオ再生が終わったら、ビデオが消える
52
52
  $("#video").css("opacity", "0");
53
53
  });
54
54
  });

2

記述を修正しました。

2021/10/15 06:26

投稿

cc-taishi
cc-taishi

スコア3

title CHANGED
File without changes
body CHANGED
@@ -24,7 +24,10 @@
24
24
 
25
25
  ### 該当のソースコード
26
26
 
27
+ ```html
27
28
  <body>
29
+
30
+
28
31
  <img class="loading-img" src="loading-img.jpg" >
29
32
  <video class="video" src="video.mp4" playsinline muted oncontextmenu="return false;"></video>
30
33
  <div class="contents">
@@ -46,11 +49,12 @@
46
49
  $(".video").play();
47
50
  }).then(function(){
48
51
  //③:ビデオ再生が終わったら、ビデオが消える
49
- $(".video").css("opacity", "0");
52
+ $("#video").css("opacity", "0");
50
53
  });
51
54
  });
52
55
  </script>
53
56
  </body>
57
+ ```
54
58
 
55
59
  ### 試したこと
56
60
 

1

間違った記述を修正しました。

2021/10/15 06:24

投稿

cc-taishi
cc-taishi

スコア3

title CHANGED
File without changes
body CHANGED
@@ -46,7 +46,7 @@
46
46
  $(".video").play();
47
47
  }).then(function(){
48
48
  //③:ビデオ再生が終わったら、ビデオが消える
49
- $("#page-loader-video").css("opacity", "0");
49
+ $(".video").css("opacity", "0");
50
50
  });
51
51
  });
52
52
  </script>