$.fancybox({
content: '<button>prev</button><button>next</button>',
href: src,
'autoScale': false,
'transitoinIn': 'none',
'transitionOut': 'none',
.......
});
我只是在fancybox中打开图片。我想在fancybox中添加一些html按钮,但问题是它覆盖了图像。但我不想覆盖图像,所以我想在图像外添加按钮。
任何帮助?
答案 0 :(得分:0)
你尝试使用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中使用按钮并将其置于绝对位置。