louisremi / background-size-polyfill

Adds support for background-size "cover" and "contain" to IE8
http://louisremi.github.com/background-size-polyfill/
MIT License
1.26k stars 359 forks source link

Doesn't work for <img> tag #33

Closed c0nstantine closed 10 years ago

c0nstantine commented 10 years ago

Thanks for the great feature but it doesn't for tag

e.g. CSS: .splash { background: url(http://louisremi.github.io/background-size-polyfill/images/jar1.jpg) center no-repeat; -ms-behavior: url(/backgroundsize.min.htc); behavior: url(/backgroundsize.min.htc); background-size: cover; } HTML: <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" width="960" height="400" class="splash" />

louisremi commented 10 years ago

This is working as intended. <img> tags aren't supposed to have a background image. You should use a different tag :-)

c0nstantine commented 10 years ago

oh, thanks for the quick feedback Louis-Rémi! are there any hacks to patch it ? thanks!!!

louisremi commented 10 years ago

As far as I know, no

On 28 November 2013 18:58, Constantine Margiev notifications@github.comwrote:

oh, thanks for the quick feedback Louis-Rémi! are there any hacks to patch it ? thanks!!!

— Reply to this email directly or view it on GitHubhttps://github.com/louisremi/background-size-polyfill/issues/33#issuecomment-29478591 .

c0nstantine commented 10 years ago

hm, but Chrome and FF support it and it looks like there is some way... one more time thank you Louis-Rémi!