【问题标题】:Move fotorama arrows outside stage将 fotorama 箭头移到舞台外
【发布时间】:2015-04-11 04:30:07
【问题描述】:

是否可以将 fotorama 箭头移出 div.fotorama_stage 并进入 div.fotorama_nav-wrap?

我希望将我的箭头定位在导航点的两侧。

谢谢!

【问题讨论】:

    标签: navigation slideshow fotorama


    【解决方案1】:

    这是我的朋友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('>');
        });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-09-23
      • 1970-01-01
      • 2012-03-13
      • 2012-12-13
      • 2019-07-17
      • 1970-01-01
      • 2017-09-21
      • 2014-02-01
      相关资源
      最近更新 更多