CSS3Pie导致启动错误 [英] CSS3Pie causing startup error

查看:76
本文介绍了CSS3Pie导致启动错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

导入CSS3Pie时,出现以下错误.

When importing CSS3Pie, I'm getting the following error.

Uncaught TypeError: Object [object DOMWindow] has no method 'attachEvent'

我正在使用Chrome.这可能是我造成的,还是一个错误.谢谢!

I am using Chrome. Is this possibly something I have caused, or just a bug. Thanks!

推荐答案

我认为您应该在仅IE的条件注释中导入"PIE.js"文件:

I think you should be importing the "PIE.js" file in an IE-only conditional comment:

<!--[if IE]>
  <script src='PIE.js'></script>
<![endif]-->

CSS3Pie项目是 Internet Explorer 工具-它可在IE上使用,并且对所有其他浏览器完全没有用.

The CSS3Pie project is an Internet Explorer facility - it only works on IE, and is completely useless for all other browsers.

edit —请注意,这是首先将素材作为.js文件导入的情况.据我所知,CSS3Pie文档都鼓励通过IE行为" CSS属性导入功能. Chrome,Firefox和Safari以及所有非IE都将忽略该属性.

edit — note that this is if you're importing the stuff as a .js file in the first place. As far as I can tell, the CSS3Pie docs all encourage the functionality to be imported via the IE "behavior" CSS attribute. That attribute will just be ignored by Chrome and Firefox and Safari and everything else that's not IE.

这篇关于CSS3Pie导致启动错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆