search

Home  >  Q&A  >  body text

html - 如何写出较好的css?

  1. 在上IFE前端学院, 在完成任务 发现一个问题,
    大家都是架构一个页面. 还原度差不多类似, 但是我的CSS可能是别人的两倍长

  2. 然后我看了别人的源码, 发现他们设计的很巧妙, 而自己没有这样的意识

  3. 发现自己的CSS布局是对html分块之后逐步细化很臃肿, 但是别人的css标签就很有意义,也很精炼

所以我想问 如何能够提高自己的CSS的水平, 写出优秀的css代码, 或者是如何养成一种良好的css布局的想法?

高洛峰高洛峰2781 days ago2057

reply all(15)I'll reply

  • 伊谢尔伦

    伊谢尔伦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!

    reply
    0
  • 天蓬老师

    天蓬老师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

    reply
    0
  • 迷茫

    迷茫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.

    reply
    0
  • 天蓬老师

    天蓬老师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

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 13:06:44

    The question should be specific in certain places to make the answer more suitable for you

    reply
    0
  • Cancelreply