logic and style

move style form style to html
add some note
fix position calculate code