离子:离子幻灯片-仅出现第一张幻灯片 [英] Ionic : Ion-slides- Only First Slide appearing
问题描述
我正在尝试向我的应用程序添加离子幻灯片,但是我遇到了一个我不知道如何解决它的问题. 我将离子幻灯片示例简单地添加到了我的页面中:
I'm trying to add ion-slides to my app, but i'm facing a problem that i don't have any idea how to solve it. I simple added the ion-slides example to my page:
<ion-slides>
<ion-slide>
<h1>Test</h1>
</ion-slide>
<ion-slide>
<h1>Test2</h1>
</ion-slide>
<ion-slide>
<h1>Test3</h1>
</ion-slide>
</ion-slides>
即使是这个简单的示例,该组件也只显示了第一张幻灯片.当我尝试滑动到下一个时,即使可以检查该元素及其内容,它也会显示一张空白幻灯片.
And even with this simple example, the component just shows the first slide. When i try to swipe to the next one, it shows a blank slide, even though it's possible to inspect this element and it's content.
您对此有何想法?
我没有在此处添加更多代码,因为即使该代码也无法正常工作. 我怀疑该问题正在发生,因为我试图在选项卡"页面中创建此元素,因此我试图将此元素添加到另一个页面中,但是我仍然具有相同的行为.
I didn't put more code here, because not even this code is working. I suspected that the problem was happening because i was trying to create this element in a Tab page, so I've tried to add this element into another page, but i still had the same behavior.
推荐答案
我找到了解决问题的方法. 当我开始开发应用程序时,我将所有元素的overflow属性设置为hidden.因此,我必须对代码进行一些更改.
I found the solution for my problem. When I started developing the application I set overflow attribute as hiddden for all Elements. So i had to make some changes in my code.
这篇关于离子:离子幻灯片-仅出现第一张幻灯片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!