[英]How can I change font size in Bootstrap?
我想縮小整個 Bootstrap 項目的大小,但無法更改字體大小。 我正在使用 StarAdmin 模板。
我試圖在style.css 中更改字體大小,但是當我更新“font-size”時,該網站仍然應用舊值。
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 0.8rem; // <===== changed value but nothing happend
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
我只想更改“基本”字體大小以調整整個網頁的大小。
將重要的添加到要覆蓋的所有 css 屬性
見演示代碼
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 0.8rem !important; // <===== Add Important
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff; }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.