Saturday, July 9, 2011

Agile and Test driven

  1. Think before writing any code. Have a sketch in mediums other than code
  2. If you're not test-driven, think of the test scenario before coding. Take care about the error handling.
    • [JS] consider about the type passed in
  3. Prioritize the test scenario, make the code pass the tests by order.

inline-block在IE

  1. IE7下block元素不支持inline-block,但是inline元素默认支持inline-block
  2. 在所有浏览器里,inline-block的对齐需要通过vertical-align进行控制。默认的对齐方式是baseline,看起来很奇怪。调节成vertical-align: top会好看很多。