将fotorama箭头移到舞台外 [英] Move fotorama arrows outside stage
本文介绍了将fotorama箭头移到舞台外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以将fotorama箭头移出div.fotorama_ 阶段并移至div.fotorama _nav-wrap中?
Is it possible to move the fotorama arrows out of div.fotorama_stage and into div.fotorama_nav-wrap?
我希望将箭头放置在导航点的两侧.
I am looking to position my arrows on either side of the nav dots.
谢谢!
推荐答案
这是我的朋友 http://jsfiddle .net/meickol/72jTR/
HTML
<!-- Just don’t want to repeat this prefix in every img[src] -->
<base href="http://fotorama.s3.amazonaws.com/i/okonechnikov/">
<!-- Fotorama -->
<div class="fotorama_custom" data-width="700" data-ratio="700/467" data-max-width="100%">
<img src="1-lo.jpg">
<img src="2-lo.jpg">
<img src="9-lo.jpg">
<img src="6-lo.jpg">
<img src="5-lo.jpg">
</div>
脚本
// 1. Initialize fotorama manually.
var $fotoramaDiv = jQuery('.fotorama_custom').fotorama();
// 2. Get the API object.
var fotorama = $fotoramaDiv.data('fotorama');
// add our buttons
jQuery("<div class='fotorama_custom__arr fotorama_custom__arr--prev'><</div>").insertBefore(".fotorama__nav-");
jQuery("<div class='fotorama_custom__arr fotorama_custom__arr--next'>></div>").insertAfter(".fotorama__nav-");
// make the buttons functionality
jQuery('.fotorama_custom__arr--prev').click(function () {
fotorama.show('<');
});
jQuery('.fotorama_custom__arr--next').click(function () {
fotorama.show('>');
});
这篇关于将fotorama箭头移到舞台外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文