在上IFE前端学院, 在完成任务 发现一个问题,
大家都是架构一个页面. 还原度差不多类似, 但是我的CSS可能是别人的两倍长
然后我看了别人的源码, 发现他们设计的很巧妙, 而自己没有这样的意识
发现自己的CSS布局是对html分块之后逐步细化很臃肿, 但是别人的css标签就很有意义,也很精炼
所以我想问 如何能够提高自己的CSS的水平, 写出优秀的css代码, 或者是如何养成一种良好的css布局的想法?
伊谢尔伦2017-04-17 13:06:44
Go and learn sass (compass artifact), less or stylus
Once you use it, you will know how good it is!
天蓬老师2017-04-17 13:06:44
In my humble opinion, the quality of writing is not only measured by the length of CSS
It is recommended to read Head First HTML/CSS first, and then read the CSS Authoritative Guide
迷茫2017-04-17 13:06:44
The key point is the page structure, css. Wouldn’t it look fancy if you play with advanced selectors? It depends on personal preference. I like to use the most basic selectors. The key is the design of the page structure.
天蓬老师2017-04-17 13:06:44
Try scss or less
Then you can use functional writing to write and manage your css styles.
After compilation, your css will be very good
大家讲道理2017-04-17 13:06:44
The question should be specific in certain places to make the answer more suitable for you