JSFiddle - React, Tailwind, and code Playground
by luka kupunia
HTML
<div id="main">
<div class="buble"></div>
<div class="buble"></div>
<div class="buble"></div>
<div class="buble"></div>
</div>
CSS
body {
margin: 0;
}
#main {
width: 100%;
height: 100vh;
background: yellow;
position: relative;
}
#main .buble {
width: 2%;
height: 2%;
background: red;
position: absolute;
border-radius: 50%;
}
JavaScript
var app = {
init : {
this.bubleSize()
},
bubles : document.querySelectorAll('.buble'),
bubleSize: function(){
console.log(this.bubles)
}
}