mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-08 13:44:59 +00:00
fix: maintain video aspect ratio using padding-bottom technique
This commit is contained in:
parent
5349c99c74
commit
3a3bc9898d
1 changed files with 10 additions and 1 deletions
|
@ -189,15 +189,24 @@ nav {
|
||||||
|
|
||||||
.video-container {
|
.video-container {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
aspect-ratio: 2656 / 2160;
|
position: relative;
|
||||||
|
height: 0;
|
||||||
|
/* Calculate exact padding-bottom based on aspect ratio: (2160/2656) × 100% */
|
||||||
|
padding-bottom: calc(2160 / 2656 * 100%);
|
||||||
|
background-color: #f5f5f5; /* Light background while video loads */
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-container video {
|
.video-container video {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue