Dev.Opera — The CSS3 object-fit and object-position Properties
Dev.Opera — The CSS3 object-fit and object-position Properties
The four possible values of object-fit are as follows: - contain: if you have set an explicit height and width on a replaced element, object-fit:contain will cause the content (e.g. the image) to be resized so that it is fully displayed with intrinsic aspect ratio preserved, but still fits inside the dimensions set for the element. - fill: causes the element’s content to expand to completely fill the dimensions set for it, even if this does break its intrinsic aspect ratio. - cover: preserves the intrinsic aspect ratio of the element content, but alters the width and height so that the content completely covers the element. The smaller of the two is made to fit the element exactly, and the larger overflows the element. - none: the content completely ignorse any height or weight set on the element, and just uses the replaced element’s intrinsic dimensions.anselmh/object-fit
沒有留言:
張貼留言