soiz1 commited on
Commit
3978c19
·
verified ·
1 Parent(s): c924419

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +2 -0
index.html CHANGED
@@ -472,6 +472,8 @@
472
  ripple.style.animationDuration = `${duration}s`;
473
 
474
  // キーフレームを動的に変更
 
 
475
  const animationName = `ripple-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
476
  ripple.style.animationName = animationName;
477
 
 
472
  ripple.style.animationDuration = `${duration}s`;
473
 
474
  // キーフレームを動的に変更
475
+ //Math.random()で 0〜1 のランダムな数を生成。 .toString(36) で36進数(0-9 + a-z)に変換。
476
+ //.substr(2, 9) で先頭の "0." を除いた部分から9文字取り出し、 結果として英数字のランダムな9文字列を生成。
477
  const animationName = `ripple-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
478
  ripple.style.animationName = animationName;
479