CSS 使用經驗備忘

來源:互聯網
上載者:User
  • CSS的浮動與LaTeX的浮動體很像;
  • 在清單項目中宜用: list-style-image + list-style-type 組合配置
  • auto的意義是:“彌補其它部分與所要求的總和之間的差異”;在複雜介面設計中只在最高架構中使用auto;
  • 浮動性的代價是:引入自身特殊性與破壞原有文檔流;而因為瀏覽器的差異,有時會引起非常糟糕的介面效果;
  • 因為瀏覽器在盒模式上的計算差異,所以儘可能少用Position:Absoluted與Position:Fixed配置
  • 注意數值配置,特別是 body{ line-height:1.5;},其表示在原有 font-size 上乘以1.5因子
  • 重載HTTP伺服器一定要用CSS Sprite技術,以減少HTTP Request響應。其步驟是在編寫完成CSS後,用 CSS Sprite Generator 進行Sprite化
  • CSS上線前一定要用 CSSTidy 進行最佳化
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.