I tried to make a modal with an iframe.
What I found out is, when u remove the
I have my iframe perfectly responsive.
The problem is, that I cant play the video. So the iframe doesn't responsive when clicking.
Does anyone know why?
The original code for the modal was this: <a href="https://getbootstrap.com/docs/4.0/components/modal/" rel="nofollow noreferrer">https://getbootstrap.com/docs/4.0/components/modal/</a>
Code:
<a href="#" data-toggle="modal" data-target="#exampleModal">
<img id="imageresource" src="http://www.justdeluxe.at/wordpress/wp-content/uploads/2019/01/nature-3048299_1920.jpg" style="width: 400px; height: 264px;"></a>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-body">
<iframe src="https://player.vimeo.com/video/80836225?badge=0" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
</div>
</div>
</div>
What I found out is, when u remove the
Code:
<div class="modal content">
The problem is, that I cant play the video. So the iframe doesn't responsive when clicking.
Does anyone know why?
The original code for the modal was this: <a href="https://getbootstrap.com/docs/4.0/components/modal/" rel="nofollow noreferrer">https://getbootstrap.com/docs/4.0/components/modal/</a>
Code:
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>