2017-07-27 75 views
4

我使用ion-select => ion-option作爲我的離子3項目的輸入。它給出了選擇的警報,但是警告主體的字體大小非常小,並且我嘗試了所有sass選項來全部增加字體大小。我曾嘗試使用.alert-md,.alert-tappable。有什麼辦法可以增加這種字體。ionic 3 alert font-sizing

enter image description here

.scss

.ios, .md { 
    page-add-stock { 
    /*.alert-md .alert-checkbox-label{ 

    }*/ 
    .alert-radio-label { 
     font-size: 3rem; 
    } 
    } 
} 

的.html

<ion-select [(ngModel)]="category" formControlName="category" > 
    <ion-option>Pesticides</ion-option> 
    <ion-option>Seeds</ion-option> 
    <ion-option>Herbicides</ion-option> 
    <ion-option>Fertilizers</ion-option> 
    <ion-option>Farming tools</ion-option> 
    </ion-select> 

的Html離子選擇生成警報,以防萬一。

回答

2

我找不到與標籤相關的任何Ionic Sass變量(我發現一個用於提示的消息,標題和副標題,但不是用於標籤),因此您始終可以使用CSS樣式規則來設置正確的字體大小:

.alert-radio-label { 
    font-size: 3rem; 
} 

默認爲font-size: 1.6rem;爲Android和font-size: 1.4rem;爲iOS。

UPDATE

請注意該警示HTML元素的頁面之外,從而使樣式規則應放置在app.scss文件。

+0

仍然沒有效果 –

+0

請嘗試從您的頁面中包裝樣式規則,例如'.ios,.md {your-page-name {/ *將您的樣式放在這裏... * /}}' – sebaferreras

+0

試圖&它仍然沒有工作 –