首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Dart聚合物:用火狐中不正确显示的PaperDialog创建CoreAnimatedPages

Dart聚合物:用火狐中不正确显示的PaperDialog创建CoreAnimatedPages
EN

Stack Overflow用户
提问于 2015-06-15 10:00:31
回答 1查看 117关注 0票数 1

我使用含有PaperDialogs的Dart聚合物CoreAnimatedPages。其想法是有弹出窗口,在其中您可以通过多个选项视图单击。

示例存储库可用于:https://bitbucket.org/neogucky/polymer-dialog-problem/

DialogView: view.html

代码语言:javascript
复制
<link rel="import" href="packages/polymer/polymer.html">
<link rel="import" href="packages/paper_elements/paper_button.html">
<link rel="import" href="packages/paper_elements/paper_dialog.html">
<link rel="import" href="packages/paper_elements/paper_dialog_transition.html">
<link rel="import" href="packages/core_elements/core_animated_pages.html">

<polymer-element name="test-view">
  <template>
    <paper-dialog id="extendedNode" vertical autoCloseDisabled=true transition="paper-transition-center" opened=true class="noTitle">
      <content> 
      <core-animated-pages selected="{{page}}" valueattr="id" transitions="hero-transition cross-fade">
            <section id="0">
                <br><br>
                <p cross-fade>Click next to see the secret text.</p>
            </section>
            <section id="1">
                <br><br>
                <p cross-fade >This text is a secret, so don't tell Firefox users!</p>
          </section>
        </core-animated-pages>
    </content>
    </paper-dialog>
  </template>

<script type="application/dart" src="view.dart"></script>
</polymer-element>

CSS-file:

代码语言:javascript
复制
html /deep/ paper-dialog {
  margin-top: -150px;
  margin-left: -300px;
}

html /deep/ paper-dialog /deep/ core-animated-pages{
  height: 300px;
  width: 600px;
}

预期的行为:在页面加载时,将弹出一个300 pxx600px对话框,左下角有一个按钮。

火狐中的行为: css文件中没有设置大小时,将显示一个小对话框,类似于chrome中的对话框。

我想确认这是否是我的错,因为我使用了不正确的CSS挂钩,或者这似乎是一个聚合物问题火狐。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-06-15 10:07:25

如果CSS不在高分子元素中,则需要添加选择器的多填充版本,以使其在没有本机阴影-DOM支持的浏览器上工作。

代码语言:javascript
复制
html paper-dialog,
html /deep/ paper-dialog {
  margin-top: -150px;
  margin-left: -300px;
}

html paper-dialog core-animated-pages,
html /deep/ paper-dialog /deep/ core-animated-pages{
  height: 300px;
  width: 600px;
}

有关详细信息,请参阅https://www.polymer-project.org/0.5/docs/polymer/styling.htmlhttps://www.polymer-project.org/0.5/articles/styling-elements.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30842334

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档