我想更改字體,但無法在 Chrome 或三星 A50、Android XI 設備上進行。我會很感激你能指導我的任何幫助,謝謝!
Ionic CLI: 6.19.0
Ionic Framework: @ionic/angular 6.0.4
Cordova CLI: 11.0.0
我復制了檔案夾 assets/fonts 中的 ttf,PermanentMarker-Regular.ttf
global.scss:
@font-face {
font-family: 'Permanent Marker', cursive;
src: url('/src/assets/fonts/PermanentMarker-Regular.ttf')
}
home.scss:
ion-content h3 {
--ion-font-family: 'Permanent Marker', cursive !important;
font-size: 24px;
}
home.html:
<ion-content [style.background-image]="'url(' img_backg ')'">
<ion-grid>
<ion-row >
<ion-col>
<h3>{{global.titulo_principal}}</h3>
………
uj5u.com熱心網友回復:
假設 home.html 是正確的,將 global.scss 的路徑更改為以下內容:
src: url('../assets/fonts/PermanentMarker-Regular.ttf')
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/476081.html
標籤:离子框架
