Xiaobian to everyone to share the width and height of the Video tag in HTML5, I believe that most people don’t know much, so share this article to everyone, I hope everyone is reading this article. Have a gain, let’s take a look at it!
Object-fit: Fill | Contain | Cover | None | scale-down
Object-fit take Note
Object-fit is mainly suitable for replacement elements, such as:
, etc. Its default is Fill . The description of the value of Object-Fill is as follows:
Fill: This value is the default value of BOJECT-FIT, and the size of the replacement content is set to the content box of the fill element, that is, The content of the element is expanded to the outer dimensions of the fully filled container, even if it breaks its inherent aspect ratio.
Contain: The replacement element content size holds a long width ratio fill element content container, and the specific object size is parsed to a width and height containing an element. That is, if you set a clear on the alternative elementThe height and width of the index will result in the content size, completely displayed in a fixed ratio, but still displayed in the element size.
- NONE: Replace element content does not adjust the size to accommodate the container of the internal element, and the content is completely ignored to any height and weight set on the element, and still in the element. Displayed in size.
Scale-Down: When the content size is setNon or
, the specific object will result in more small.