3

我正在使用 Poylmer 1.0,但我仍然阅读https://www.polymer-project.org/0.5/articles/styling-elements.html#cat。有谁知道同样的逻辑是否适用于Shadydom?

我真的很喜欢https://events.google.com/io2015/制作视频的方式。它用于paper-dialog显示视频并占据整个视口。

我很难paper-dialog采取完整的视口。如图所示,我似乎无法强迫它。我已经尝试过top: 0px; bottom 0px; left: 0px, right: 0px,但这会破坏这种行为。fit给了我到目前为止你在图像中看到的最接近的外观。

  <paper-dialog class="video-dialog fit">
   <div class="layout horizontal">
    <paper-button dialog-dismiss>
      <paper-icon-button icon="arrow-back"></paper-icon-button>
    </paper-button>
  </div>
    <div style="height: 100%; width: 100%">
      <google-youtube style="height: 100%;"
        video-id="YMWd7QnXY8E"
        rel="1"
        start="5"
        playsinline="0"
        controls="2"
        showinfo="0"
        width="100%"
        height="100%"
        autoplay="1">
      </google-youtube>
  </paper-dialog>

问题,请:

  1. 只是为了确认,所有的孩子paper-dialog都在 light dom,对吗?

  2. paper-dialog像在 https://events.google.com/io2015/中那样填充视口​​,我需要使用/deep/::shady执行此操作吗?似乎<paper-dialog class="fit">会这样做。

在此处输入图像描述

4

1 回答 1

0

想通了....查看了源代码并在margin那里找到了属性....我只是将其更改为 0px;

于 2015-07-14T01:33:02.463 回答