简体   繁体   English

(聚合物) <core-animation-pages> 使用“从右滑动”时,内容在主DIV之外渗出

[英](Polymer) <core-animation-pages> content bleeding outside main DIV when using “slide-from-right”

Here's a brief video I recorded showing this behaviour: https://www.dropbox.com/s/j20zaw2h472l9iu/polymer-slide.mov 这是我录制的简短视频,显示了此行为: https : //www.dropbox.com/s/j20zaw2h472l9iu/polymer-slide.mov

I've succesfully implemented core-animation-pages on my web app. 我已经在我的Web应用程序上成功实现了核心动画页面。 I've got 3 differentes div's that transition using the slide-from-right animation with no problem, except that in desktop view the content doesn't "hide" within the main div (white color) and instead is seen on top of the gray background for about a second. 我有3个不同的div,可以使用从右滑动的动画进行过渡,这没有问题,除了在桌面视图中,内容不会“隐藏”在主div(白色)内,而是显示在灰色背景约一秒钟。 This is not visible on mobile or tablet view. 这在手机或平板电脑视图中不可见。

Is there anything CSS-wise I need to write to avoid this? 我需要编写一些CSS明智的方法来避免这种情况吗?

Here's my code: 这是我的代码:

<core-toolbar class="medium-tall">
<div flex class="title">Elementos del lenguaje visual</div>
<div class="bottom fit" horizontal layout>
  <paper-tabs flex noink selected="{{selected}}">   
    <paper-tab>LÍNEA</paper-tab>
    <paper-tab>FORMA</paper-tab>
    <paper-tab>COLOR</paper-tab>        
  </paper-tabs> 
</div>
</core-toolbar>

  <div class="{{ {scroll: !wide} | tokenList }}" layout vertical flex>
  <core-animated-pages id="pages" selected="{{selected}}" on-core-animated-pages-transition-end="{{done}}" transitions="slide-from-right" layout flex>      

    <div id="linea">
    <div id="bidimensional">
    {{CONTENT}}
    </div>
    <div class="separador"></div>
    <div id="tridimensional">
    {{CONTENT}}
    </div>   
    </div>

  </core-animated-pages>
  </div>

在您的核心动画页面上使用overflow:hidden ,以便作为容器使用,当您在容器内对页面进行动画处理时,它将隐藏所有溢出内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM