2 ms·
Easier to overlay other dom nodes than having a wrapper and position hacks.
by w-ll 10y ago
Easier to overlay other dom nodes than having a wrapper and position hacks.
- tvanantwerp 10y agoI recently learned of a CSS property, object-fit, than can achieve the same positioning effects as background-size for DOM elements without having to inject background-image style attributes. But, unsurprisingly, it's got no IE support. https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit