1

我有两个图像,在悬停时显示一个缩放按钮,该按钮将在模式中放大所述图像,问题是它只显示第一张图像。我如何让它拉出正确的图像?我也在用螺栓。

谢谢你的帮助。

  <div class="container">
               <div class="row">

         {% for offering in offerings.offerings %}

                    <div class="col-sm-6">
                        <div class="offering-items">
                            <img src="{{ asset(offering.mimage.file, 'files') }}" alt="image" class="img-responsive">

                            <div class="overlay2">
                                <button data-target="#myModal" data-toggle="modal" class="zoom">zoom</button>
                            </div>
                        </div>
                    </div>


                <div id="myModal" class="modal fade" role="dialog">
                    <div class="modal-dialog modal-lg">
                        <div class="modal-body">
                            <button type="button" class="close" data-dismiss="modal">&times;</button>
                            <img src="{{ asset(offering.mimage.file, 'files') }}" alt="image" class="img-responsive">
                        </div>
                    </div>
                </div>
      {% endfor %}
      <!-- end -->
            </div>
4

0 回答 0