p.responsive-video {
position: relative;
padding-bottom: 66.66%; /* Aspect ratio: 560/840 = 0.666 */
height: 0;
overflow: hidden;
max-width: 100%;
}
.responsive-video video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
@media (max-width: 768px) {
.responsive-video {
padding-bottom: 56.25%; /* 16:9 ratio for smaller screens */
}
}
@media (max-width: 480px) {
.responsive-video {
padding-bottom: 75%; /* Adjust as needed for mobile */
}
}
Comments
Post a Comment