發現一種方法,利用CSS 字體,將數字表現為圖案的方法,這種方法還是能省去圖片資源下載的。如果可行還不錯哦。
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<style type="text/css">
p{
font:20px/2 Webdings;
}
</style>
<title>Webdings 字體數字圖案</title>
</head>
<body>
<p id="p1">1 2 3 4 5 6 7 8 9 0</p>
</body>
</html>
需要注意的是得考慮下瀏覽器兼容性。 比如我剛才用firefox 4.0 打開的時候,發現看到的是完全是數字。
posted on 2011-03-27 13:40
-274°C 閱讀(395)
評論(0) 編輯 收藏 所屬分類:
web前端