Q
角料和更改字體
4
A
回答
8
您可以嘗試在你的CSS
或SCSS
使用*
selector:
* {
font-family: Raleway /*Replace with your custom font*/, sans-serif !important;
/*Add the !important to overwrite all elements*/
}
編輯:從2.0.0-beta.7
開始,現在有自定義排版方式:
@import '[email protected]/material/theming';
$custom-typography: mat-typography-config(
$font-family: 'Raleway'
)
@include angular-material-typography($custom-typography);
或者(2.0.0-beta.10
及以上):
// NOTE: From `2.0.0-beta.10`, you can now pass the typography via the mat-core() mixin:
@import '[email protected]/material/theming';
$custom-typography: mat-typography-config(
$font-family: 'Raleway'
)
@include mat-core($custom-typography);
+0
你在哪裏把你的style.scss?我收到以下錯誤「功能mat-typography-config不支持關鍵字參數」 –
+0
@TonyScialo檢查我的更新答案。 – Edric
+0
ahhh是的,謝謝加入主題導入爲我工作。謝謝! –
相關問題
- 1. 角度材料2更改字體大小
- 2. 角材料字體家庭開關
- 3. 更改角度材料datePicker圖標
- 4. 字體和字體大小更改
- 5. 更改Div字體大小和字體
- 6. DevExpress和C#字體更改
- 7. 更改字體
- 8. 更改字體
- 9. 添加後的面料畫布字體樣式更改
- 10. 更新角材料版本
- 11. 更改字體UIBarButtonItem
- 12. 更改TextView字體?
- 13. 更改MathJax字體?
- 14. UINavigationBar更改字體
- 15. 更改字體2013
- 16. TextView字體更改
- 17. 更改ListView字體
- 18. UITableViewActionRow更改字體
- 19. Android字體更改
- 20. MessageBox.Show--字體更改?
- 21. Iphone應用程序中的動態字體更改和字體顏色更改
- 22. 支持DPI和默認字體更改
- 23. 更改字體大小和樣式
- 24. 更改字體大小和行heigth wordpress
- 25. Laravel Mix和SASS更改字體目錄
- 26. 更改顏色和NStextView的字體
- 27. Imagemagick更改標籤字體和壁球
- 28. Emacs + Mac OSX和更改默認字體
- 29. 更改位置和字體.phtml文件?
- 30. Firefox和IE中的字體未更改
看這個問題:https://github.com/angular/material2/issues/205 –
材料1和材料2? – Edric
這是材料2 – Nav