Polymer2.0 - 使用纸质图标

时间:2017-07-09 04:09:30

标签: polymer polymer-2.x polymer-2.0

我正在寻找无法使用的聚合物铁图标列表中的json格式图标

类似于http://cdn.mysitemyway.com/etc-mysitemyway/icons/legacy-previews/icons/high-resolution-dark-blue-denim-jeans-icons-alphanumeric/072287-high-resolution-dark-blue-denim-jeans-icon-alphanumeric-bracket-curley.png

的内容

我尝试了下面的解决方法,但它没有工作

<paper-icon-button id="json">{}</paper-icon-button>

https://codepen.io/nagasai/pen/rwqYYZ

<head>
<base href="https://polygit.org/polymer+v2.0.0/shadycss+webcomponents+1.0.0/components/">
<link rel="import" href="polymer/polymer.html">
<link rel="import" href="paper-icon-button/paper-icon-button.html">
<link rel="import" href="iron-icons/iron-icons.html">
<div class="toolbar">
</head>

<body>
      <paper-icon-button id="json">{}</paper-icon-button>
      <paper-icon-button id="save" icon="icons:save"></paper-icon-button>
</body>

1 个答案:

答案 0 :(得分:0)

<paper-icon-button>有一个src property来指定所需图片的网址。您甚至可以指定问题中指明的.png网址,如下所示:

<paper-icon-button src="http://cdn.mysitemyway.com/etc-mysitemyway/icons/legacy-previews/icons/high-resolution-dark-blue-denim-jeans-icons-alphanumeric/072287-high-resolution-dark-blue-denim-jeans-icon-alphanumeric-bracket-curley.png"></paper-icon-button>

codepen