gpt4 book ai didi

javascript - Ion slide box - 如何在 ion slide 中滑动全宽 iframe 视频

转载 作者:数据小太阳 更新时间:2023-10-29 05:35:19 26 4
gpt4 key购买 nike

在我的页面上,我有一个用于图像的 ion-slide-box。由于在我的应用程序中用户将能够嵌入视频,因此我还应该将带有视频的 iframe 添加到同一个 slider 。这就是我的代码现在的样子:

这是我的 html:

<ion-slide-box ng-if="slider.length > 1">
<ion-slide ng-repeat="item in slider">
<img ng-if="item.image" ng-src="{{ fileServer }}/imagecache/cover/{{ item.image }}" class="cover">
<iframe ng-if="item.video" src="{{ item.video | safeUrl }}"></iframe>
</ion-slide>
</ion-slide-box>

这只适用于图像,但是当我有视频时,如果它们占据 100% 的宽度,我将无法滑动它们,这是我在我的 css 中设置的,如果它们的宽度小于该宽度,我只能滑动它们如果我只在 iframe 不占用 slider 空间的那部分滑动它们。由于我需要让 iframe 占用 100% 的宽度,我想知道如何让它工作?

最佳答案

你试过了吗ion-slides相反?

ion-slide-box 是 deprecated

ion-slide-box will be removed in the next Ionic release in favor of the new ion-slides component. Don't depend on the internal behavior of this widget.

关于javascript - Ion slide box - 如何在 ion slide 中滑动全宽 iframe 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38226180/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com