css notes_07_16

日期:2016-7-16 22:13 | 标签: | 阅读:499

css notes take at 2016-07-16 in nan shan lib



casecade rules

  1. reader important
  2. author important
  3. author normal
  4. reader normal
  5. user agent declaration

css units

  1. in(inch)
  2. cm 2.54cm equals to 1 in
  3. pt mainly used for printer
  4. 1pc = 12pt
  5. px abosolute length
  6. em relative


right value usually count after left value if negative value setted, width may grow out of bound. pay attention to border margin value would not affect inline element but did affect its inline height


auto height works with border. it may result in weried effect. specially with margin and so on..




how weights work

  1. it may not directly mapped to the value, beacuse the browser may not support it that much!
  2. small caps
  3. font-size-ajust:the same font size result in different effect
  4. text-indent only apply to block element, if you want to use it for inline ele, you could use margin or padding as your friends, you can also use negative value. usually works fine with padding
  5. white-space:pre|normal|nowrap, pre would not ignore white-space

how about set width to a specific value?

96ppi reference pixels what is inlune elements what is run-in elements

版权声明: 署名-非商业性使用-禁止演绎 4.0 国际(CC BY-NC-ND 4.0
Copyright ©2013-2017 | 粤ICP备14081691号 | yipeng手工打造 | 联系方式