scss icomoon
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scss icomoon相关的知识,希望对你有一定的参考价值。
font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?9s40wt');
src: url('fonts/icomoon.eot?9s40wt#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?9s40wt') format('truetype'),
url('fonts/icomoon.woff?9s40wt') format('woff'),
url('fonts/icomoon.svg?9s40wt#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: '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;
}
@mixin icofont {
font-family: '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-arrow_left:before {
content: "\e900";
}
.icon-arrow_right:before {
content: "\e901";
}
.icon-arrow:before {
content: "\e902";
color: #000;
}
.icon-dots:before {
content: "\e903";
}
.icon-instagram:before {
content: "\e904";
}
.icon-twitter:before {
content: "\e905";
}
&::after {
content: "\e902";
@include icofont;
font-family: icomoon;
font-size: 10px;
position: absolute;
}
以上是关于scss icomoon的主要内容,如果未能解决你的问题,请参考以下文章
无法使用 webpack 导入 icomoon 自定义字体
从icomoon加载自定义字体
SVG 到字体 (IcoMoon) 创建多个路径
icomoon
css 将Icomoon图标导入CSS
使用icomoon字体图标详解