Polymerjs paper-material

在Polymer.js中, paper-material是一个容器, 显示了高架纸的作用。在命令提示符下使用以下命令以在工作状态下获取目录中的纸张材料。

bower install --save PolymerElements/paper-material

Polymerjs paper-material

文章图片
例子
创建一个index.html文件, 并在其中添加以下代码, 以查看Polymer.js中paper-material元素的使用。
< !doctype html> < html> < head> < link rel = 'import' href = 'http://www.srcmini.com/my-app.html'> < /head> < body> < my-app> < /my-app> < /body> < /html>

【Polymerjs paper-material】现在, 打开my-app.html文件, 并在其中包含以下代码。
< link rel = 'import' href = 'http://www.srcmini.com/bower_components/polymer/polymer.html'> < link rel = "import" href = "http://www.srcmini.com/bower_components/paper-listbox/paper-listbox.html"> < link rel = "import" href = "http://www.srcmini.com/bower_components/paper-material/paper-material.html"> < dom-module id = 'my-app'> < template> < style> paper-material { display: inline-block; background: white; box-sizing: border-box; margin: 7px; padding: 14px; border-radius: 3px; } < /style> < h3> Paper-Material Example< /h3> < paper-material elevation = "5"> "Tutorialspoint"< /paper-material> < paper-material elevation = "0"> is< /paper-material> < paper-material elevation = "5"> Simply Easy Learning Online Tutorials< /paper-material> < /template> < script> Polymer ({ is: 'my-app', ready: function() { this.async(function() { }); } }); < /script> < /dom-module>

输出
Polymerjs paper-material

文章图片

    推荐阅读