Difference between revisions of "Template:TecCEM/BubblesTemplate"

 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<html>
 
<html>
         <style type="text/javascript">
+
         <style type="text/css">
 
             @keyframes rise_up{
 
             @keyframes rise_up{
 
from{
 
from{
Line 6: Line 6:
 
}
 
}
 
to{
 
to{
bottom: 80%;
+
bottom: 90%;
 
}
 
}
 
      }
 
      }
Line 14: Line 14:
 
function generate_bubble(size_px, left, speed_percentage){
 
function generate_bubble(size_px, left, speed_percentage){
 
var div = document.createElement("div");
 
var div = document.createElement("div");
var animTime = 10*speed_percentage/100;
+
var animTime = 20*speed_percentage/100;
 
div.style.width = size_px.toString() + "px";
 
div.style.width = size_px.toString() + "px";
 
div.style.height = size_px.toString() + "px";
 
div.style.height = size_px.toString() + "px";
Line 23: Line 23:
 
div.style.animationDuration = animTime.toString() +"s";
 
div.style.animationDuration = animTime.toString() +"s";
 
div.style.animationName = "rise_up";
 
div.style.animationName = "rise_up";
div.style.animationIterationCount = "infinite";
+
div.style.animationIterationCount = 'infinite';
 
document.getElementsByClassName('bubbles_window')[0].appendChild(div);
 
document.getElementsByClassName('bubbles_window')[0].appendChild(div);
 
}
 
}

Latest revision as of 21:26, 11 October 2021