optimize getCss(),use for/in instead of for