gpt4 book ai didi

css - 更改 uikit 的默认 CSS 字体

转载 作者:太空宇宙 更新时间:2023-11-03 23:03:35 25 4
gpt4 key购买 nike

你会更改 uikit 的默认字体吗? UIKit

默认字体是

"Helvetica Neue",Helvetica,Arial,sans-serif 

及其在 html 元素标签上的设置。如果我将 html 标记中自定义样式上的此字体更改为其他字体,它不会覆盖更改。我可以使用 important 来改变事情:

html {
font: 'Raleway', sans-serif !important;
}

这会按预期更改全局字体但是 font-awesome 显然不再有效,因为 !important 覆盖了它。有什么想法吗?

最佳答案

这已经很老了,但无论如何我都会发布当前的工作答案,以防其他人需要版本 3 作为 documented here :

// 1. Your custom variables and variable overwrites. If you are using google fonts,
//follow their instructions as normal as well. (add a link in the html for example).
$global-font-family: 'Ubuntu', sans-serif;

// 2. Import default variables and available mixins.
@import "../../node_modules/uikit/src/scss/variables-theme.scss";
@import "../../node_modules/uikit/src/scss/mixins-theme.scss";

// 3. Import UIkit.
@import "../../node_modules/uikit/src/scss/uikit-theme.scss";

关于css - 更改 uikit 的默认 CSS 字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35564248/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com