JSFiddle - React, Tailwind, and code Playground
by Johan Muller
HTML
<div class="p1"></div>
<div class="p2"></div>
<div class="p3"></div>
CSS
body {
position: relative;
}
div {
display: block;
position: absolute;
width: 3px;
height: 3px;
background: #000;
}
.p3 {
background: red;
}
JavaScript
x1 = 100;
y1 = 100;
x2 = 200;
y2 = 200;
x3 = x2;
y3 = y1;
$('.p1').css({'top':y1+'px','left':x1+'px'});
$('.p2').css({'top':y2+'px','left':x2+'px'});
$('.p3').css({'top':y3+'px','left':x3+'px'});