繁体   English   中英

多个项目sencha轮播

[英]Multiple items sencha carousel

你好

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

基本上,我在轮播中显示上一张和下一张商品卡片的一部分。 因为一张图片值一千个单词,所以这是我想要获得的最终视图:

最后

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

我尝试了很多事情,但到目前为止没有任何工作。

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

如果您将轮播页面3推到一页上,并且要增加间距(边距或填充)以产生效果,那绝对有可能。

在此阶段,没有公开的多项目轮播示例(一页),但是有可能,我目前正在研究多项目轮播。 我添加了页边距和填充以在一页上获得15张缩略图。

:-)

您可以使用旋转木马的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;'
            }
        ] 
    }); 

请参阅此博客文章,在其中对其进行解释:

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

他们在代码中使用了此代码:

itemLength: browserWidth * 0.8.

有一个Coverflow插件可用,它不完全相同,但相似。 在此处查看演示:

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

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM