内容简介:翻译自:https://stackoverflow.com/questions/30900593/polymer-1-0-app-theme-only-affecting-index-html-and-not-on-custom-elements
home-page>中应用元件.我希望某些元素在全局范围内应用主题. app-theme.html中唯一适用于其他任何地方的样式是CSS自定义属性,例如–dark-primary-color.
有什么办法可以创建适用于整个项目的主题吗?我已经尝试将app-theme.html专门导入到我的元素中,并没有什么区别.提前致谢.
的主题应该适用于整个项目.
只需下载其中一个预制主题(或使用 Polymer Theme Builder 创建自己的主题)并在<head>中链接到它,如下所示:
<style is="custom-style">
@import url("path/to/theme.css");
</style>
或者,看看如何在该网站上应用样式.
免责声明:我是polymerthemes.com的创始人之一.
翻译自:https://stackoverflow.com/questions/30900593/polymer-1-0-app-theme-only-affecting-index-html-and-not-on-custom-elements
以上所述就是小编给大家介绍的《css – Polymer 1.0 app-theme仅影响index.html,而不影响自定义元素》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 子元素设置margin-top为什么影响了父元素
- CSS 基础:块级元素、行内元素、替换元素、非替换元素
- CSS 技巧篇(六):display设置元素为行内元素时,元素之间存在间隙问题
- 探究行内元素和块级元素
- 重学前端:块级元素与内联元素
- 使CSS伪元素:在与主元素相同的高度之前
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Design and Analysis of Distributed Algorithms (Wiley Series on P
Nicola Santoro / Wiley-Interscience / 2006-10-27 / USD 140.95
This text is based on a simple and fully reactive computational model that allows for intuitive comprehension and logical designs. The principles and techniques presented can be applied to any distrib......一起来看看 《Design and Analysis of Distributed Algorithms (Wiley Series on P》 这本书的介绍吧!