factorise the demo css code; also avoid using linear gradient are some browser are slow to render it