简体   繁体   English

多个项目sencha轮播

[英]Multiple items sencha carousel

Hi, 你好

I could not manage to get where i want with my carousel. 我无法通过旋转木马到达想要的地方。 This is for an iPhone / iPad web App. 这适用于iPhone / iPad Web应用程序。

Basically i want to show part of my previous and next item card inside the carousel. 基本上,我在轮播中显示上一张和下一张商品卡片的一部分。 Because a picture is worth a thousand words here is the final view i want to obtain : 因为一张图片值一千个单词,所以这是我想要获得的最终视图:

最后

Same as in the appStore preview screenshots of an app. 与appStore中的应用预览屏幕截图相同。

I have tried many things but nothing have work so far. 我尝试了很多事情,但到目前为止没有任何工作。

Any tips would be great :) Thank you ! 任何提示都很棒:)谢谢!

This would definitely be possible, if you were to 'push' the carousel pages 3 onto one page, with spacing (margin or padding) up high to create the effect. 如果您将轮播页面3推到一页上,并且要增加间距(边距或填充)以产生效果,那绝对有可能。

At this stage there are no public examples of multi item (on one page) carousels, but it is possible and I am currently working on a multi item carousel. 在此阶段,没有公开的多项目轮播示例(一页),但是有可能,我目前正在研究多项目轮播。 I added margin and padding to achieve 15 thumbnails on 1 page. 我添加了页边距和填充以在一页上获得15张缩略图。

:-) :-)

you can use set itemLength property of 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;'
            }
        ] 
    }); 

See this blog post where they explain it: 请参阅此博客文章,在其中对其进行解释:

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

They used this in their code: 他们在代码中使用了此代码:

itemLength: browserWidth * 0.8.

There is a coverflow plugin available not exactly same but similar. 有一个Coverflow插件可用,它不完全相同,但相似。 Check the demo here: 在此处查看演示:

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

You can get the source code here: 您可以在此处获取源代码:

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

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

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