第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

Ionic2學(xué)習(xí)基礎(chǔ)之Toast和Grid

標(biāo)簽:
JavaScript AngularJS
Ionic2 组件之Toast

和Alert组件类似,都是为了提示信息给用户看的,不过使用Toast不会像Alert那样会显示遮罩层。

Options
Property Type Default Description
message string -- 显示的信息
duration number -- 提示框持续的时间,如果不设置则持续到dismiss()事件被调用
position string 'bottom' 提示框出现的位置,可选的有:top,middle,bottom
showCloseButton boolean false 是否显示关闭按钮
closeButtonText string 'Close' 关闭按钮上显示的文本
dismissOnPageChange boolean false 切换页面时是否关闭提示框
cssClass string -- 额外的样式
demo

使用方式如下:

presentToast(){
let toast = this.toastCtrl.create({
message:'this is a toast',
duration:3000,
position:"bottom",
showCloseButton:true,
closeButtonText:'x',
cssClass:'danger',
dismissOnPageChange:true
});
toast.present();
}
Ionic2 组件之Grid

和现在html流行的自适应栅格布局类似,Ionic也是采用了grid来进行布局
简单的用法如下:

<ion-grid>
    <ion-row>
        <ion-col width-10>This column will take 10% of space</ion-col>
    </ion-row>
</ion-grid>

可以看到和bootstrap非常类似,因此offset肯定也是有的了

栅格大小
Property width(百分比)
width-10 10%
width-20 25%
width-33 33.3333%
width-50 50%
width-67 66.6666%
width-75 75%
width-80 80%
width-90 90%
demo
<ion-grid>
        <ion-row>
            <ion-col width-10>width-10</ion-col>
            <ion-col width-20>width-20</ion-col>
            <ion-col width-50>width-50</ion-col>
        </ion-row>
        <ion-row>
            <ion-col width-33>width-33</ion-col>
            <ion-col width-33>width-33</ion-col>
            <ion-col width-33>width-33</ion-col>
        </ion-row>
        <ion-row>
            <ion-col width-20 offset-33 center>width-33</ion-col>
        </ion-row>
        <ion-row wrap>aaa</ion-row>
        <ion-row wrap>aaa</ion-row>
        <ion-row wrap>aaa</ion-row>
        <ion-row center>
            <ion-col width-33>width-33</ion-col>
            <ion-col width-33 >aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</ion-col>
        </ion-row>
        <ion-row baseline>
            <ion-col width-33>width-33</ion-col>
            <ion-col width-33 >bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</ion-col>
        </ion-row>
    </ion-grid>

个人博客

點(diǎn)擊查看更多內(nèi)容
3人點(diǎn)贊

若覺(jué)得本文不錯(cuò),就分享一下吧!

評(píng)論

作者其他優(yōu)質(zhì)文章

正在加載中
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說(shuō)多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開(kāi)微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊(cè)有機(jī)會(huì)得

100積分直接送

付費(fèi)專(zhuān)欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會(huì)
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

舉報(bào)

0/150
提交
取消