How to make a video play in popup window? starting from iframe

868 views Asked by At

I'm new to building websites and development in general. I'm building a static site with video's in Iframes who these iframes are also in a container div. Like this

<div class="container">
<iframe src="https://player.vimeo.com/video/4***" width="560" height="315" frameborder="0" allow="autoplay; fullscreen" allowfullscreen id="frame1"> </iframe>
</div>

the css to my iframe is this:

iframe{
        width:185px;
        height:185px;
        border-radius: 50%;
    }

I'm trying to make the video play in a bigger "pop-up" window. without leaving the page. But i'm clueless. Can somebody get me on track?

1

There are 1 answers

0
Anurag Hale On

A single change (define styles for container class instead of iframe) will give the desired output:

<div class="container">
    <iframe src="https://player.vimeo.com/video/4***" width="560" height="315" frameborder="0" allow="autoplay; fullscreen" allowfullscreen id="frame1"></iframe>
</div>

.container{    //define styles for container class instead of iframe
    width:185px;
    height:185px;
    border-radius:50%;
}