多项sencha旋转木马

时间:2011-11-10 16:30:14

标签: javascript sencha-touch extjs carousel sencha-touch-2

您好,

我无法通过旋转木马得到我想要的地方。这适用于iPhone / iPad网络应用程序。

基本上我希望在旋转木马中显示我上一张和下一张卡片的一部分。因为这里的图片胜过千言万语是我想要获得的最终视图:

final

与应用的appStore预览屏幕截图相同。

我尝试了很多东西但到目前为止还没有任何工作。

任何提示都会很棒:)谢谢!

4 个答案:

答案 0 :(得分:1)

如果您要将轮播页面3“推”到一个页面上,间距(边距或填充)高,以创建效果,这肯定是可能的。

在这个阶段,没有多项目(在一页上)旋转木马的公开示例,但它是可能的,我目前正在研究多项目轮播。我添加了边距和填充,以在1页上实现15个缩略图。

: - )

答案 1 :(得分:0)

有一个可用的Coverflow插件不完全相同但相似。在这里查看演示:

http://twomonkeys.com.ar/lab/cover/

您可以在此处获取源代码:

https://github.com/elmasse/Ext.ux.Cover

答案 2 :(得分:0)

你可以使用Carousel的set itemLength属性,

Ext.create('Ext.Carousel', {
        fullscreen: true,
         itemLength: 250, // **you can change value as you want**
        defaults: {
            styleHtmlContent: true
        }, 
        items: [
            {
                html: 'item1',
                style: 'background-color:red;'
            }, {
                html: 'item2',
                style: 'background-color:white;'
            }, {
                html: 'item3',
                style: 'background-color:gray;'
            }, {
                html: 'item4',
                style: 'background-color:blue;'
            }, {
                html: 'item5',
                style: 'background-color:yellow;'
            }
        ] 
    }); 

答案 3 :(得分:0)

请参阅此博客文章,了解其中:

http://www.sencha.com/blog/using-the-leap-motion-controller-with-sencha-touch/

他们在代码中使用了这个:

itemLength: browserWidth * 0.8.
相关问题