【发布时间】:2015-01-26 12:16:40
【问题描述】:
我在我的网页中使用polymer 的paper-action-dialog 和paper-button。纸张动作对话框中有两个纸张按钮。我想从外部(主 html)设置这些纸质按钮的样式。我用shadow DOM 表示法写了CSS 样式。这些样式在 Firefox 浏览器中运行良好,但在 Google-chrome 浏览器中无法正常运行。我应该怎么做才能在 chrome 中完成这项工作?
标记
<paper-action-dialog class="ask" backdrop autoCloseDisabled=true heading="Heading!">
<p>This is the sample paragraph.</p>
<paper-button autofocus class="test" affirmative>Edit</paper-button>
<paper-button autofocus class="test" affirmative>OK</paper-button>
</paper-action-dialog>
CSS
paper-action-dialog::shadow paper-button.test{
font-size: small;
height: 100%;
padding-top: 5px;
width: 100%;
margin: 0 0;
}
编辑:
答案在于评论:
选择器应该是overlay-host::shadow paper-button.test
【问题讨论】:
标签: html css google-chrome polymer shadow-dom