gpt4 book ai didi

javascript - 在 fancybox 外添加自定义 html

转载 作者:行者123 更新时间:2023-11-28 02:14:03 24 4
gpt4 key购买 nike

 $.fancybox({
content: '<button>prev</button><button>next</button>',
href: src,
'autoScale': false,
'transitoinIn': 'none',
'transitionOut': 'none',
.......
});

我只是在 fancybox 中打开图像。我想在 fancybox 中添加一些 html 按钮,但问题是它覆盖了图像。但我不想覆盖图像,所以我想在图像外添加按钮。

有什么帮助吗?

最佳答案

试试 z-index 怎么样?

<style>
.btn1 {z-index: 5;}

</style>
<html>
...
<html>
<script>

$.fancybox({
content: '<button class="btn1">prev</button><button class="btn1">next</button>',
href: src,
'autoScale': false,
'transitoinIn': 'none',
'transitionOut': 'none',
.......
});

或者您可以尝试将按钮放在 html 中并将其定位为绝对位置。

关于javascript - 在 fancybox 外添加自定义 html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48576342/

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