fix bug when set margin to view, add more demos