firefox moz,网页转换
我有以下内容:
.ui-dialog-body {
position: relative; /* Needed for sliding left, right */
min-height:60px;
padding: .5em 1em;
}
.ui-dialog-body.slideLeft {
left:-500px;
-webkit-transition: left .5s linear;
-webkit-transition-delay: .2s;
-moz-transition-property: left;
-moz-transition-duration: .5s;
}
当用户单击需要加载的项目时,会添加 SlideLeft 类,该类会将 div 滑出视图。这在 webkit(safari、chrome)中效果很好,但在 FireFox 4 beta 中则不然。
有什么想法吗?
I have the following:
.ui-dialog-body {
position: relative; /* Needed for sliding left, right */
min-height:60px;
padding: .5em 1em;
}
.ui-dialog-body.slideLeft {
left:-500px;
-webkit-transition: left .5s linear;
-webkit-transition-delay: .2s;
-moz-transition-property: left;
-moz-transition-duration: .5s;
}
When the user clicks an item which requires loading, the class slideLeft is added which slides the div out of view. This works great in webkit (safari, chrome) but not in FireFox 4 beta.
Any ideas why that is?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您需要在第一个样式规则中使用
left: 0
,以便过渡从 0px 到 500px(可以插值),而不是自动到 500px(不能插值)。(此外,您的 -webkit-* 声明和 -moz-* 声明之间存在差异,但我认为没有必要。)
Maybe you need
left: 0
in the first style rule so that the transition is from 0px to 500px (which can be interpolated) rather than auto to 500px (which can't).(Also, there are differences between your -webkit-* declarations and your -moz-* declarations, but I don't think there need to be.)
将声明放在元素上,而不是添加的类上:
Put the declaration on the element, not the added class: