3 ms·
<div class="post-image bg-center bg-contain bg-no-repeat" data-img="" style="background-image: url("http://okgo.net/build/wp-content/uploads/2016/11/spreadsheet
by AceJohnny2 10y ago
<div class="post-image bg-center bg-contain bg-no-repeat" data-img="" style="background-image: url("http://okgo.net/build/wp-content/uploads/2016/11/spreadsheet.png"); padding-top: 57%;"></div>
What ever happened to <img> elements :(
- w-ll 10y agoEasier 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
- spiderfarmer 10y agoCourage.
- TeMPOraL 10y agoIndeed. It makes it only more annoying to get at the content you want, the way you want. http://okgo.net/build/wp-content/uploads/2016/11/spreadsheet.png http://okgo.net/build/wp-content/uploads/2016/11/spreadsheet...