javascript - Trouble with Div boxes positioning and sine waves -
right i'm trying have 8 div boxes form sine wave in such way the waves goes through bottom-left , top-right of each div, having trouble doing. here's have far:
var divarr = new array(); for(i = 0; <= 8; i++){ var ypos = 50 + 50 * math.sin((i/8) * 2 * math.pi); divarr[i] = os.dom.add_element('div', view, {position: 'absolute', width: '50px', height: yheight+'px', 'background-color': '#000000'}); var yheight = 20; divarr[i].style.left = (i * 50)+'px'; divarr[i].style.top = ypos+'px';
Comments
Post a Comment