funtion that generate a red div that rotate alternate and has position absolute using this syntax function cubologo(top, left, parent) { } so I can set the top and left position and its parent where it will be append
function cubologo(top, left, parent) { var div = document.createElement('div'); div.style.backgroundColor = 'red'; div.style.width = '100px'; div.style.height = '100px'; div.style.position = 'absolute'; div.style.top = top; div.style.left = left; div.style.transform = 'rotateY(90deg)'; div.style.transition = 'transform .5s' document.querySelector(parent).appendChild(div); } cubologo('300px', '300px', 'body');