(4 intermediate revisions by one other user not shown) | |||
Line 6: | Line 6: | ||
} | } | ||
to{ | to{ | ||
− | bottom: | + | 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 = | + | 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 = | + | 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