我們將在以下章節中處理 Quasar 提供的排版。
標題
text-h1
h1
標題 1
text-h2
h2
標題 2
text-h3
h3
標題 3
text-h4
h4
標題 4
text-h5
h5
標題 5
text-h6
h6
標題 6
text-subtitle1
副標題 1
text-subtitle2
副標題 2
text-body1
Body 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur unde suscipit, quam beatae rerum inventore consectetur, neque doloribus, cupiditate numquam dignissimos laborum fugiat deleniti? Eum quasi quidem quibusdam.
text-body2
Body 2. Lorem ipsum dolor sit amet consectetur adipisicing elit. Cupiditate aliquid ad quas sunt voluptatum officia dolorum cumque, possimus nihil molestias sapiente necessitatibus dolor saepe inventore, soluta id accusantium voluptas beatae.
text-caption
註腳文字
text-overline
上標線
字體粗細
text-weight-thin
Lorem Ipsum 僅為印刷和排版產業的範例文本。
text-weight-light
Lorem Ipsum 僅為印刷和排版產業的範例文本。
text-weight-regular
Lorem Ipsum 僅為印刷和排版產業的範例文本。
text-weight-medium
Lorem Ipsum 僅為印刷和排版產業的範例文本。
text-weight-bold
Lorem Ipsum 僅為印刷和排版產業的範例文本。
text-weight-bolder
Lorem Ipsum 僅為印刷和排版產業的範例文本。
CSS 輔助類別
類別名稱 | 描述 |
---|---|
text-right | 文字靠右對齊 |
text-left | 文字靠左對齊 |
text-center | 文字置中對齊 |
text-justify | 文字將會對齊 |
text-bold | 文字將會是粗體 |
text-italic | 文字將會是斜體 |
text-no-wrap | 不可換行的文字 (套用 white-space: nowrap ) |
text-strike | 套用 text-decoration: line-through |
text-uppercase | 將文字轉換為大寫 |
text-lowercase | 將文字轉換為小寫 |
text-capitalize | 將文字的第一個字母大寫 |
預設字體
預設嵌入的網頁字體是 Roboto。 但這不是必需的。您可以使用任何您喜歡的字體。
Roboto 提供了 6 種不同的字體粗細可供使用:100、300、400、500、700、900。
如果您想移除預設嵌入的 Roboto 字體,可以在這裡找到它
extras: [
'roboto-font'
]
content_paste
新增自訂字體
也可以包含其他字體以便在應用程式中使用。以下是一種方法
- 將您的新網頁字體
[customfont].woff
(或任何副檔名;建議使用woff
以獲得跨瀏覽器相容性) 複製到您選擇的目錄中,例如:./src/css/fonts/[customfont.woff]
- 在
./src/css/app.{css|sass|scss|styl}
中宣告您的字體 (或在您認為合適的任何位置,但請正確更新網頁字體檔案的相對路徑)
@font-face {
font-family: customfont;
src: url(./fonts/customfont.woff);
}
// declare a class which applies it
.my-font {
font-family: 'customfont';
}
content_paste
- 然後在您需要的地方使用該類別。