【问题标题】:Element moved using JS/jQuery PIE not updating使用 JS/jQuery PIE 移动的元素未更新
【发布时间】:2011-04-08 04:40:00
【问题描述】:

我已经使用 JS 在 body load 上移动了一个元素,但 PIE 仍然有元素的背景可见或位置错误。但是,在触发运动/动画的后续点击/交互中,PIE 可以正常工作。这是为什么?我什至尝试使用setTimeout(..., 1200) 来更新元素位置,但似乎没有更新

我在想如果有一个PIE ready 事件可以用来更新元素位置,它会修复它吗?

$masthead.css({top: "-" + ($masthead.outerHeight() - 20) + "px"});

我还注意到 PIE 会将这些元素(PIE 生成的背景等)放置在适当的位置,就好像没有运行 JS(更改类名/位置)一样。我怀疑这就是问题

【问题讨论】:

  • 或许$(masthead).css({top: ($(masthead).outerHeight() - 20) + "px"});
  • 所以你把$masthead改成了$(masthead)?我猜你的意思是$("#masthead")?如果是这样,实际上我已经做到了var $masthead = $("#masthead")
  • 哦,..我不知道,这在其他浏览器中是否有效???
  • erm 没有 PIE 是的,JS 可以工作。所以这是一个 IE 唯一的问题,如果我删除 PIE 它也可以正常工作。只是不是 CSS3 投影然后...
  • 好吧,PIE到底是什么,PIE图表??

标签: javascript jquery css internet-explorer css3pie


【解决方案1】:

我使用图像来代替阴影...但我认为 PIE.js 会起作用。

// after changes by JS
PIE.attach($("elem")[0]);

【讨论】:

    猜你喜欢
    • 2021-04-03
    • 1970-01-01
    • 2014-12-17
    • 2018-08-05
    • 1970-01-01
    • 1970-01-01
    • 2017-02-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多