----icon moon追加新字体图标----
生活随笔
收集整理的這篇文章主要介紹了
----icon moon追加新字体图标----
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
一、初始自定義字體為icon moon1
@font-face {
font-family: 'icomoon1';
src: url('fonts/icomoon1.eot?9fhn24');
src: url('fonts/icomoon1.eot?9fhn24#iefix') format('embedded-opentype'),
url('fonts/icomoon1.ttf?9fhn24') format('truetype'),
url('fonts/icomoon1.woff?9fhn24') format('woff'),
url('fonts/icomoon1.svg?9fhn24#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon1','icomoon' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-buy:before {
content: "\e001";
} 二、下載再次調(diào)用的字體為icomoon
①在原來的css中(默認(rèn)是style.css)中調(diào)用icon moon @font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?28knl0');
src: url('fonts/icomoon.eot?28knl0#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?28knl0') format('truetype'),
url('fonts/icomoon.woff?28knl0') format('woff'),
url('fonts/icomoon.svg?28knl0#icomoon') format('svg');
font-weight: normal;
font-style: normal;
} ②加入字體和對(duì)應(yīng)代碼
@font-face {
font-family: 'icomoon1';
src: url('fonts/icomoon1.eot?9fhn24');
src: url('fonts/icomoon1.eot?9fhn24#iefix') format('embedded-opentype'),
url('fonts/icomoon1.ttf?9fhn24') format('truetype'),
url('fonts/icomoon1.woff?9fhn24') format('woff'),
url('fonts/icomoon1.svg?9fhn24#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon1','icomoon' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-buy:before {
content: "\e001";
} 二、下載再次調(diào)用的字體為icomoon
①在原來的css中(默認(rèn)是style.css)中調(diào)用icon moon @font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?28knl0');
src: url('fonts/icomoon.eot?28knl0#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?28knl0') format('truetype'),
url('fonts/icomoon.woff?28knl0') format('woff'),
url('fonts/icomoon.svg?28knl0#icomoon') format('svg');
font-weight: normal;
font-style: normal;
} ②加入字體和對(duì)應(yīng)代碼
?
? ?轉(zhuǎn)載于:https://www.cnblogs.com/zjy850984598/p/10845570.html
總結(jié)
以上是生活随笔為你收集整理的----icon moon追加新字体图标----的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 全民k歌唱完的歌保存在哪里(全民直播倒闭
- 下一篇: 使用docker的mysql镜像