我有一个英雄的过渡坐在一个聚合物元素内。文档指出,转换将工作在最多1层的阴影根。(https://www.polymer-project.org/docs/elements/core-elements.html#core-animated-pages)。但是,它不起作用。
如果我将元素移出阴影区域,它就会像预期的那样工作。
<polymer-element name="x-el" noscript>
<template>
<div hero-id="hero-test" hero> GO HERO </div>
</template>
</polymer-element>
<core-animated-pages transitions="hero-transition cross-fade">
<section>
// works
<div hero-id="hero-test" hero> GO HERO </div>
// doesn't work
<x-el></x-el>
</section>
<section>
<div hero-id="hero-test" hero> YAY </div>
</section>
</core-animated-pages>现场演示:http://codepen.io/nicolasrannou/pen/zxNYMw
我是不是遗漏了什么?
谢谢
发布于 2015-01-07 13:18:35
只要移除自定义元素之外的“部分”,它就能工作了!
<!--<section>-->
<x-el onclick="stuff(1);"></x-el>
<!--</section>-->检查这个:http://codepen.io/anon/pen/yygydK
祝你好运
https://stackoverflow.com/questions/27814949
复制相似问题