Polymerjs paper-input元素

【Polymerjs paper-input元素】Polymerjs paper-input是结合样式的文本字段。在命令提示符下使用以下命令可以在工作状态下在目录中输入纸张。

bower install --save PolymerElements/paper-input

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

现在, 打开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/iron-icons/iron-icons.html"> < link rel = "import" href = "http://www.srcmini.com/bower_components/paper-input/paper-input.html"> < dom-module id = 'my-app'> < template> < style> paper-input {max-width: 300px; }< /style> < h3> Paper-Input Example < /h3> < paper-input label = "User Name"> < iron-icon icon = "account-circle"prefix> < /iron-icon> < /paper-input> < paper-input label = "Password"> < iron-icon icon = "lock-outline" prefix> < /iron-icon> < /paper-input> < /template> < script> Polymer ({is: 'my-app', ready: function() {this.async(function() {}); }}); < /script> < /dom-module>

    推荐阅读