我使用標籤圖標,但我看到了這個網站:www.fontello.com
您可以在其中創建帶有圖標的字體。字體圖標和PNG圖標
但是,當我創建帶有圖標的字體時,它比我的所有圖標都大,因爲有svg,ttf,woff和eot,所有4種字體都比png圖標大。
@font-face {
font-family: 'fonticons';
src: url("../font/fonticons.eot");
src: url("../font/fonticons.eot?#iefix") format('embedded-opentype'), url("../font/fonticons.woff") format('woff'), url("../font/fonticons.ttf") format('truetype'), url("../font/fonticons.svg#fonticons") format('svg');
font-weight: normal;
font-style: normal;
}
我所有的圖標都是optipng壓縮的.png圖像。
這是否適用於所有瀏覽器?
那麼,爲什麼我應該使用這種字體方法呢?
和fontello.com
的任何替代方法?
兩個*精靈地圖*和*符號字體作爲圖標*都有各自的優點和缺點。對於用戶而言,下載單個文件對於下載多個微小圖像要好得多,即使所有微小圖像的組合文件大小都小於單個文件。 – cimmanon