Will CSS3PIE .htc file load for other browsers even they don't need?

后端 未结 3 1545
失恋的感觉
失恋的感觉 2021-01-20 00:35

I\'m using CSS3Pie to make round corners in IE which uses invalid CSS property

behavior: url(/PIE.htc);

If i keep this declarition in my ma

3条回答
  •  -上瘾入骨i
    2021-01-20 01:30

    An updated answer (February 2014) since it seems a rather unclear topic.

    The way it works is that you trigger the load of the HTC library via the "behavior" property.

    "behavior" is an IE6-9 property only, see MS official website "Support for element behaviors and HTML components (HTCs) has been removed in Internet Explorer 10 standards and quirks modes for improved interoperability and compliance with HTML5."

    Hence, the "behavior" property could only trigger the load of anything when used on IE6-9.

    The library should never be loaded for IE10+ NOR for other browsers (ie. Chrome, Firefox, Safari, & so on)

    I have tested in the same way as @BoltClock & found that nor the htc, nor the js was loaded when I was not on an IE6-9 browser, as expected. I tested on IE8, IE9, Chrome 32, IE11, & Firefox 27 (see screenshots below).

    I'll try to spend some more time testing this further, maybe I missed something. In the meantime, anyone can test using the official demo page css3pie.com/demos/ & browserstack.com (they have a free trial) for instance.

    Chrome, Firefox & IE11 are not loading the css3pie js library, as expected: Chrome 12

    Firefox 32

    IE11 Note: the "dynamisch skripts" directory list the javascript added directly inside the page (not referenced to a separated js file)

    IE9 loads a css3pie js library, as expected: IE9

    IE8 loads a css3pie js library, as expected: IE8

    Note 1: note that the lib loaded for IE8 or for IE9 is different.

    Note 2: chrome, firefox & IE11 do not load any css3pie library but may load some css3pie CSS, this might need further testing.

提交回复
热议问题