css+div 小結

來源:互聯網
上載者:User
以下測試環境是IE6:
1. 網頁圖片格式的選擇:
  • gif, 適用於圖片顏色不是很多,精確度要求不是很高的時候。因為gif會使檔案比較小,這樣可以大大提高網頁瀏覽速度。
  • jpg, 適用於比較精細的圖片,大量使用會使網頁速度下降。

2. 畫一條單像素線的兩種方法:

  • <div style="border-bottom:1px dashed #ccc"></div>
  • css: hr{ border: solid 1px black} <hr size="1px" />(自總結,IE6中通過,有待研究)

3. 盡量使用padding而不是margin,這是因為IE的怪毛病不少,它會在不定的地方無法正確顯示margin-right/left屬性,所以使用padding(間隙,Dreamweaver中又被稱為填充)屬性。

4.word-break的運用(自總結)

  • normal :  中英文相同,保持字的完整,然後換行
  • break-all :  中文同normal,英文會在字內斷開
  • keep-all :  中文會在標點處換行,英文同normal
相關文章

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.