心有多大舞臺便有多大

          Embrace changes, pursue excellence, share niceness.

          從小處看gmail的性能

          今天無聊在看gmail首頁的html代碼時,看到了關于頁頭里的“歡迎使用 Gmail”這一行字的UI設計代碼,由此看到為了性能,真正的好網(wǎng)站是怎么優(yōu)化的:


          在上面的這段html頁面中,gmail使用了一個table,代碼如下:
          <tr>
            <td nowrap="nowrap">
            <table width="100%" cellspacing="0" cellpadding="0" bgcolor="#c3d9ff" align="center" style="margin-bottom: 5px;">
            <tbody><tr>
            <td valign="top" align="left" class="bubble tl"><div class="SPRITE_corner_tl"></div></td>
            <td style="padding: 5px 0pt; font-family: arial; text-align: left; font-weight: bold;" rowspan="2" class="bubble"><b>歡迎使用 Gmail</b></td>
            <td valign="top" align="right" class="bubble tr"><div class="SPRITE_corner_tr"></div></td>
            </tr>
            <tr>
            <td valign="bottom" align="left" class="bubble bl"><div class="SPRITE_corner_bl"></div></td>
            <td valign="bottom" align="right" class="bubble br"><div class="SPRITE_corner_br"></div></td>
            </tr>
            </tbody></table>
            </td>
            </tr>
          為了既考慮UI效果,又能避免帶來速度上的影響,用了最少的圖片來實現(xiàn)彎角效果(圖片在div的SPRITE_corner CSS中),從而避免設計成一個大的圖片而影響用戶瀏覽器下載資源的速度。
          從我這個非UI設計人員的視角來看,不知道GMAIL這樣設計的初衷是否是這樣的,如果不是的話,請高手賜教。

          posted on 2010-04-12 15:41 pony 閱讀(368) 評論(0)  編輯  收藏 所屬分類: 網(wǎng)站

          主站蜘蛛池模板: 衡山县| 苏尼特右旗| 石渠县| 眉山市| 永德县| 襄垣县| 泽库县| 本溪市| 南昌县| 依安县| 忻州市| 建平县| 屏南县| 普格县| 雷山县| 巫溪县| 荔浦县| 金堂县| 武陟县| 洞头县| 江都市| 阜城县| 枣强县| 华阴市| 浠水县| 陵川县| 湄潭县| 梁山县| 汶上县| 灵武市| 宿州市| 巩留县| 洞头县| 天峨县| 大石桥市| 肇庆市| 共和县| 客服| 白城市| 中牟县| 登封市|