S
sormaria
Gamma
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
En el siguiente ejemplo podemos ver como insertar un vídeo de youtube responsive con css de una manera sencilla u eficiente, lo que haremos es configurar el iframe o el object que utiliza youtube para insertar sus vídeos.
[table="width: 600, class: outer_border, align: center"]
[tr]
[td]<style>
.video-container {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
overflow: hidden;
}
.video-container iframe,
.video-container object {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
<div class="video-container">
<iframe src="https://www.youtube.com/embed/xaR0VnckBNE" frameborder="0" allowfullscreen></iframe>
</div>[/td]
[/tr]
[/table]
Demo: Responsive YouTube videos to scale in all browsers, ipads, iPhones and tablets
Última edición: