慕課網實戰—《用元件方式開發 Web App全站 》筆記二
阿新 • • 發佈:2019-01-10
$(function () {
var h5 = new H5();
h5
.addPage('face')
.addComponent('logo',{
text:'logo',
width:'400',
height:'100',
css:{backgroundColor:'red',top:200 ,opacity:0},
center:true,
animateIn: {opacity:1},
animateOut: {opacity:0}
})
.addComponent('slogan',{
text:'slogan',
width:'400',
height:'100' ,
css:{backgroundColor:'green',top:300,opacity:0},
center:true,
animateIn: {opacity:1},
animateOut: {opacity:0}
})
.addPage('desc')
.addComponent('caption' ,{
text:'核心理念',
width:'400',
height:'100',
css:{backgroundColor:'blue',top:300,opacity:0},
center:true,
animateIn: {opacity:1},
animateOut: {opacity:0}
})
.addPage('page-3')
.addComponent('caption',{
text:'課程方向分佈',
width:'400',
height:'100',
css:{backgroundColor:'yellow',top:300,opacity:0},
center:true,
animateIn: {opacity:1},
animateOut: {opacity:0}
})
.loader(); // 新增若干圖片資源
})