I encountered some challenges while styling the Vimeo video I embedded.
Here is the player I am using:
I want the player to occupy the entire screen for all viewport sizes, so I applied min-width: 100vh
and min-height: 100vw
.
I was able to adjust the width of the player with the following code:
::v-deep iframe {
min-width: 100vw;
min-height: 100vw;
.player {
width: 100vw;
height: 100vh;
}
}
But the min-height property didn't work as expected. Does anyone know how to resolve this issue?
Edit: This is the code snippet that I have currently:
body {
background-color: yellow;
padding: 0;
margin: 0;
}
.container {
height: 100vh;
width: 100vw;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
iframe {
min-width: 100vw;
min-height: 100vw;
}
.player {
width: 100vw;
height: 100vh;
}
<div class="h-screen flex items-center justify-center overflow-hidden">
<iframe id="player1" src="https://player.vimeo.com/video/76979871" width="630" height="354" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>