比较来自世界各地的卖家的域名和 IT 服务价格

如何改变 bootstrap.css font-family HTML 在我自己加载的字体上

我试图找到如何做到这一点
https://coderoad.ru/24075222/
几乎得到了我。 但是她 / 他使用链接来更改字体。

但我有自己的下载字体
https://font-converter.net/en
/.eot .otf .svg .ttf .woff .woff2/

我有
style.css

, 如下所示:


/* font converted using font-converter.net. thank you! */
@font-face {
font-family: "CataneoBT-Regular";

src: url/"./fonts/07323Cataneo.svg"/ format/"svg"/, /* Legacy iOS */
url/"./fonts/07323Cataneo.ttf"/ format/"truetype"/, /* Safari, Android, iOS */
url/"./fonts/07323Cataneo.woff"/ format/"woff"/, /* Modern Browsers */
url/"./fonts/07323Cataneo.woff2"/ format/"woff2"/; /* Modern Browsers */
font-weight: normal;
font-style: normal;
}


这是我的代码的一部分。 bootstrap.css html:


html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}


我的bootstrap最相似的代码是:


@font-face {
font-family: 'Glyphicons Halflings';
src: url/'../fonts/glyphicons-halflings-regular.eot'/;
src: url/'../fonts/glyphicons-halflings-regular.eot?#iefix'/
format/'embedded-opentype'/,
url/'../fonts/glyphicons-halflings-regular.woff2'/
format/'woff2'/,
url/'../fonts/glyphicons-halflings-regular.woff'/
format/'woff'/,
url/'../fonts/glyphicons-halflings-regular.ttf'/
format/'truetype'/,
url/'../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular'/
format/'svg'/;
}
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}


但据我所知,这个代码很容易显示某种图标

我不知道如何在我自己的字体上更改此代码
已邀请:

龙天

赞同来自:

刚使用 following CSS 对于您的文件 CSS, 这应该包括 after
bootstrap

..


@font-face {
font-family: <your-font>;
src: url/<your-font-path>/;
}
html, body {
font-family: <your-font>, sans-serif; /*Specify your font name here*/
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}


</your-font></your-font-path></your-font>

八刀丁二

赞同来自:

在文件中 style.css 您需要将字体系列链接,请送到字体

src


@font-face {
font-family: 'sans-serif';
font-weight: normal;
font-style: normal;
src: url/'../fonts/sans-serif.eot'/ format/'embedded-opentype'/, url/'../fonts/sans-serif.woff'/ format/'woff'/, url/'../fonts/sans-serif.ttf'/ format/'truetype'/, url/'../fonts/sans-serif.otf'/ format/'opentype'/, url/'../fonts/sans-serif.svg#sans-serif'/ format/'svg'/;
}

要回复问题请先登录注册