styling and rotate to words in javascript