javascript - How to arrange the elements of a semicircle in css/html/js -
i seem lost how mark phrases list (named title1, title2, title3, etc on attached image) in semicircle form. maybe there easy css crossbrowser solution (no-no, no ie6, ha-ha), or need use javascript? can't insert image, because have requirement text on page should real text.
or maybe there jquery plugins solve such issue..

thanks in advance!
i use javascript , simple math calculate position of each title. formula x , y position on circle following:
x = radius * cos( angle ) y = radius * sin( angle ) so using this, can calculate position of each title:
elem.style.left = radius * math.cos( angle ) + "px"; // angle in radians elem.style.top = radius * math.sin( angle ) + "px"; i have made demo fiddle showing this: http://jsfiddle.net/eghpg/
Comments
Post a Comment