我正在尝试解决这个错误:http://code.google.com/p/chromium/issues/detail?id=20574考虑执行转换,然后在通过JavaScript将元素定位在其最终位置时将其删除。
我试过了
document.getElementById('popover').style.setProperty("-webkit-transform", "translate3d(0,0,0)")和
document.getElementById('popover').style.setProperty("-webkit-transform", "none")似乎都没有任何效果。
如果我删除转换并手动定位元素,则固定元素的行为与其应有的行为相同。
以下是变换本身:
#popover.open {
display: block;
position: relative;
-webkit-animation: openpopup 0.2s 1;
-webkit-animation-fill-mode: forwards;
}
#popover.closed {
-webkit-animation: closepopup 0.2s 1;
-webkit-animation-fill-mode: forwards;
}
@-webkit-keyframes openpopup {
from {
-webkit-transform: translate3d(0, 100%, 0);
}
to {
-webkit-transform: translate3d(0, 0%, 0);
}
}
@-webkit-keyframes closepopup {
from {
-webkit-transform: translate3d(0, 0%, 0);
}
to {
-webkit-transform: translate3d(0, 100%, 0);
}
}发布于 2013-02-07 00:56:25
Javascript为您尝试更改的css属性使用了不同的名称。它被称为WebkitTransform。
document.getElementById('popover').style.setProperty("WebkitTransform", "none");应该可以工作。
https://stackoverflow.com/questions/14734120
复制相似问题