change CssLength percent flags

1. change CssLength percent flags
2. fix some code