霓虹灯动画-页面在动画时跳跃
neon-animated-pages jumping when animating
每当页面动画时,它都会在结束时跳转。内容的上下变化非常快。
样式:
:host {
display: block;
padding: 10px;
}
#animatedPages .iron-selected {
position: static;
}
#animatedPages{
overflow: hidden;
}
Html: <paper-card class="fullwidth" heading="{{heading}}">
<div class="card-content">
<neon-animated-pages id="animatedPages"
selected="0"
entry-animation="[[entryAnimation]]"
exit-animation="[[exitAnimation]]">
<neon-animatable>
<paper-input label="Wat is de actieve ingrediënt in paracetamol?"></paper-input>
</neon-animatable>
<neon-animatable>
<paper-input label="Hoeveel is de max inname van hoestdrank per dag?"></paper-input>
</neon-animatable>
</neon-animated-pages>
</div>
<div class="card-actions">
<div class="layout-horizontal">
<paper-fab icon="arrow-back" on-tap="previousQuestion"></paper-fab>
<paper-fab icon="[[nextButtonIcon]]" class="margin-left-auto" on-tap="nextQuestion"
id="nextButton"></paper-fab>
</div>
</div>
</paper-card>
相关js:
nextQuestion: function () {
if (!this.checkIfFinalQuestion()) {
this.entryAnimation = "slide-from-right-animation";
this.exitAnimation = "slide-left-animation";
this.$.animatedPages.selectNext();
if (this.checkIfFinalQuestion()) {
return this.transformNextButtonToSendButton(true);
}
return this.transformNextButtonToSendButton(false);
}
},
previousQuestion: function () {
if(this.checkIfFirstQuestion()){
return;
}
this.entryAnimation = "slide-from-left-animation";
this.exitAnimation = "slide-right-animation";
this.$.animatedPages.selectPrevious();
if(!this.checkIfFinalQuestion()){
return this.transformNextButtonToSendButton(false);
}
},
我试过从:host
移除填充,但这没有帮助。我把position: static
放在.iron-selected
上,否则neon-animatable
就没有足够的高度
显然这是一个已知的chrome错误,在FireFox中不会发生。Bug报告:https://bugs.chromium.org/p/chromium/issues/detail?id=649195#
相关文章:
- 如何设置html元素填充的动画
- jQuery设置的边距顶部使内容跳跃.如何使其平滑动画化
- 设置高度动画时元素跳跃
- CSS3关键帧-改变动画持续时间导致“;跳跃”;
- 仅使用JavaScript创建跳跃动画
- jQuery动画保持跳跃
- 尝试在canvas / JS中动画一个跳跃
- javascript中的跳跃动画
- 霓虹灯动画-页面在动画时跳跃
- 动画在空白处跳跃
- jQuery展开/折叠动画'跳跃'超过一定的高度
- javascript滚动动画后的跳跃滚动
- 我的jquery动画是跳跃的
- jQuery设置一个粘贴者跳跃的动画(先设置顶部动画,然后设置底部动画)
- 画布外 - 左侧导航栏动画在关闭时非常跳跃/滞后
- 为什么我的jQuery SlideDown动画滞后/跳跃
- HTML5/Javascript -为什么我的动画在第一次开始时跳跃
- CSS3跳跃动画
- chrome上的Jquery滚动动画跳跃
- JQuery动画的顶部和左侧同时(跳跃&运行)