【发布时间】:2019-09-10 07:01:29
【问题描述】:
我使用了谷歌字体中的“ubuntu”字体。 我需要字体粗细:300,但按钮的字体粗细属性不起作用。它仍然是粗体。
<button type="button" class="btn btn-primary">Primary</button>
@import url('https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700&display=swap');
.btn {
font-family: 'Ubuntu', sans-serif;
font-weight: 300;
}
【问题讨论】:
-
可能是其他 CSS 被覆盖。您能否分享 URL 以便更好地理解。
-
使用浏览器 Web 控制台检查应用样式的元素。