Thursday 15 July 2010

html - Picturefill not working in Internet Explorer; not recognizing srcset? -


I have used picturefill to load some images on my web page, but they display correctly in chrome Internet Explorer 8 does not display at all.

Here's a sample of my code:

  & lt; Link href = "styles css" rel = "stylesheet" type = "text / css" & gt; & Lt; Script src = "js / modernizr.custom.11641.js" & gt; & Lt; / Script & gt; & Lt; Script async = "true" src = "js / picturefill.js" & gt; & Lt; / Script & gt; & Lt; Script src = "js / response.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "wrapper" & gt; & Lt; Header class = "x-padding in-b-padding" & gt; & Lt; H1 class = "nocontent outline" & gt; Baseball for busy people & lt; / H1> & Lt; Picture class = "logo" & gt; & Lt ;! - [If IE 9]> gt; & Lt; Video style = "display: none;" & Gt; & Lt ;! [AndIf] - & gt; & Lt; Source srcset = "images / logo.png" media = "(minimum-width: 750px)" & gt; & Lt ;! - [If IE 9] & gt; & Lt; / Video & gt; & Lt ;! [AndIf] - & gt; & Lt; Img srcset = "images / logo-small.png" alt = "baseball for busy people" & gt; & Lt; / Pictures & gt;  

(I'm including the top part in adding my file) is part of the problem.

I can see the demo in IE 8. But the images on my page are not working.

Here's what I tried:

  1. I have copied the code from the demo in my page and pasted it (Completely changing the image path) - they were not displayed. / Li>
  2. I received a & lt; Picture & gt; The script has been added to create an element (though I'm using Modernin, so it should not be necessary).
  3. I've added an SRCR path for the IMG tag, which has worked, but I've read that PictureFill does not recommend it.

I know that this question was asked very long ago, but it may be that Help others too who walk on the same issue. I had the same problem where the picturefile images were not being loaded in browsers on my website, which does not support it originally (for example IE9 - IE11). It was decided to make sure that PictureFill () was called when the element was added to the page (I told it in an instruction in Kangaroo and in the reaction item component).


No comments:

Post a Comment