0

我正在使用 Sencha Touch、JavaScript 和 HTML 5 在该应用程序中创建简单的应用程序我想自动滑动 html 页面怎么做?

我使用以下代码显示带有图像的 html 页面。

main.js文件:

Ext.create('Ext.Carousel', {
    fullscreen: true,

    defaults: {
        styleHtmlContent: true
    },

    config: {
        ui : 'light'
    },

    items: [
        {
            html : '<img src="resources/images/Picture1.png" width="100%" height = "100%" align="middle" /> <audio autoplay loop><source src="resources/audio/music1.mp3"></audio>',
            style: 'backgroundImage: url(resources/images/bg.png);backgroundRepeat: repeat;backgroundPosition: center'
        },
        {
            html : '<img src="resources/images/Picture2.png" width="100%" height = "100%" margin=0 align="middle" />',
            style: 'backgroundImage: url(resources/images/bg.png);backgroundRepeat: repeat;backgroundPosition: center'
        },
        {
            html : '<img src="resources/images/Picture3.png" width="100%" height = "100%" margin=0 align="middle" />',
            style: 'backgroundImage: url(resources/images/bg.png);backgroundRepeat: repeat;backgroundPosition: center'
        }
    ]
});
4

1 回答 1

-1

您需要使用 Ext JS Task Runner。在函数中,您需要编写用于移动不同项目的逻辑。您可能必须将项目放在面板中,然后在屏幕上滑动面板。

于 2012-04-11T10:11:57.163 回答