twitter-bootstrap – Dart聚合物模板中的Twitter Bootstrap样式
发布时间:2020-12-18 00:14:20 所属栏目:安全 来源:网络整理
导读:使用polymer.dart,如何确保使用页面中引用的样式仍可在模板中使用? 我有一个消费或主页面,因此: htmlhead link rel="stylesheet" href="aplaceontheinterweb" / link rel="import" href="ponies.html" //headbody div class="defined_in_the_included_file
使用polymer.dart,如何确保使用页面中引用的样式仍可在模板中使用?
我有一个消费或主页面,因此: <html> <head> <link rel="stylesheet" href="aplaceontheinterweb" /> <link rel="import" href="ponies.html" /> </head> <body> <div class="defined_in_the_included_file"> ... </div> <div is="a-pony"></div> <script src="packages/polymer/boot.js"></script> </body> </html> 和模板,因此: <polymer-element name="a-pony" extends="div"> <template> <div class="defined_in_the_css_file_referenced_in_main_html"> .... </div> </template> </polymer-element> 和< div>在呈现页面时,在a-pony元素中没有正确设置样式. 我已经看过演示内容并阅读了this,但这些特定于模板中声明的样式,并不包括样式在外部的情况. 解决方法
尝试在代码中添加apply-author-styles:
import 'package:polymer/polymer.dart'; @CustomTag("a-pony") class APony extends PolymerElement { void created(){ super.created(); var root = getShadowRoot("a-pony"); root.applyAuthorStyles = true; } } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 使用os.system(“bash code”)在Python脚本中调用bash命令是
- 如何更改订单:bnext和:bimvious在vim?
- 如何压缩unix中的整个文件夹树,但只有某些文件?
- 5周第1次课(11月13日) 安装软件包的三种方法 rpm包介绍 y
- 【数据结构】【CF1073D】 Berland Fair
- angularjs – 集成量角器与Yeoman通过Grunt
- 将vim / youcomepleteme与anaconda python集成
- angular – md-autocomplete onSelectionChange两次射击
- shell整理(38)===凯撒加密和解密
- shell脚本文件执行分析