Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Latest commit

 

History

History
21 lines (21 loc) · 727 Bytes

File metadata and controls

21 lines (21 loc) · 727 Bytes

< Previous     Next >


width

If the width property is set to 100%, the video player will be responsive and scale up and down:
video {
  width: 100%;
  height: auto;
}
Notice that in the example above, the video player can be scaled up to be larger than its original size. A better solution, in many cases, will be to use the max-width property instead.

max-width

If the max-width property is set to 100%, the video player will scale down if it has to, but never scale up to be larger than its original size:
video {
  max-width: 100%;
  height: auto;
}