Polymer 纸张图标按钮在应用程序工具栏区域不可见
正在学习Polymer的布局,应用程序工具栏区域中的纸张图标按钮不可见,代码为`Polymer 纸张图标按钮在应用程序工具栏区域不可见,polymer,polymer-1.0,Polymer,Polymer 1.0,正在学习Polymer的布局,应用程序工具栏区域中的纸张图标按钮不可见,代码为` <!-- sample-content included for demo purposes only --> <link rel="import" href="app-layout/demo/sample-content.html"> <link rel="import" href="iron-icon/iron-icon.html"> <link rel="impor
<!-- sample-content included for demo purposes only -->
<link rel="import" href="app-layout/demo/sample-content.html">
<link rel="import" href="iron-icon/iron-icon.html">
<link rel="import" href="paper-styles/paper-styles.html">
<link rel="import" href="paper-icon-button/paper-icon-button.html">
<style is="custom-style">
body {
/* No margin on body so toolbar can span the screen */
margin: 0;
}
app-toolbar {
/* Toolbar is the main header, so give it some color */
background-color: #1E88E5;
font-family: 'Roboto', Helvetica, sans-serif;
color: white;
--app-toolbar-font-size: 24px;
}
</style>
</head>
<body>
<app-toolbar>
<paper-icon-button icon="menu"></paper-icon-button>
<div title>Spork</div>
<paper-icon-button icon="search"></paper-icon-button>
</app-toolbar>
</body>`
身体{
/*主体上没有边距,所以工具栏可以跨越屏幕*/
保证金:0;
}
应用程序工具栏{
/*工具栏是主标题,所以给它一些颜色*/
背景色:#1E88E5;
字体系列:“Roboto”,Helvetica,无衬线;
颜色:白色;
--应用程序工具栏字体大小:24px;
}
你知道为什么吗?谢谢
<!-- sample-content included for demo purposes only -->
<link rel="import" href="app-layout/demo/sample-content.html">
<link rel="import" href="iron-icon/iron-icon.html">
<link rel="import" href="paper-styles/paper-styles.html">
<link rel="import" href="paper-icon-button/paper-icon-button.html">
<style is="custom-style">
body {
/* No margin on body so toolbar can span the screen */
margin: 0;
}
app-toolbar {
/* Toolbar is the main header, so give it some color */
background-color: #1E88E5;
font-family: 'Roboto', Helvetica, sans-serif;
color: white;
--app-toolbar-font-size: 24px;
}
</style>
</head>
<body>
<app-toolbar>
<paper-icon-button icon="menu"></paper-icon-button>
<div title>Spork</div>
<paper-icon-button icon="search"></paper-icon-button>
</app-toolbar>
</body>`
正确的答案应该是:
[带按钮的应用程序工具栏][3]
<!-- sample-content included for demo purposes only -->
<link rel="import" href="app-layout/demo/sample-content.html">
<link rel="import" href="iron-icon/iron-icon.html">
<link rel="import" href="paper-styles/paper-styles.html">
<link rel="import" href="paper-icon-button/paper-icon-button.html">
<style is="custom-style">
body {
/* No margin on body so toolbar can span the screen */
margin: 0;
}
app-toolbar {
/* Toolbar is the main header, so give it some color */
background-color: #1E88E5;
font-family: 'Roboto', Helvetica, sans-serif;
color: white;
--app-toolbar-font-size: 24px;
}
</style>
</head>
<body>
<app-toolbar>
<paper-icon-button icon="menu"></paper-icon-button>
<div title>Spork</div>
<paper-icon-button icon="search"></paper-icon-button>
</app-toolbar>
</body>`
BuddyG您缺少导入铁图标
,其中包含搜索
和菜单
图标。包括这些应该可以解决您的问题
<!-- sample-content included for demo purposes only -->
<link rel="import" href="app-layout/demo/sample-content.html">
<link rel="import" href="iron-icon/iron-icon.html">
<link rel="import" href="paper-styles/paper-styles.html">
<link rel="import" href="paper-icon-button/paper-icon-button.html">
<style is="custom-style">
body {
/* No margin on body so toolbar can span the screen */
margin: 0;
}
app-toolbar {
/* Toolbar is the main header, so give it some color */
background-color: #1E88E5;
font-family: 'Roboto', Helvetica, sans-serif;
color: white;
--app-toolbar-font-size: 24px;
}
</style>
</head>
<body>
<app-toolbar>
<paper-icon-button icon="menu"></paper-icon-button>
<div title>Spork</div>
<paper-icon-button icon="search"></paper-icon-button>
</app-toolbar>
</body>`
身体{
/*主体上没有边距,所以工具栏可以跨越屏幕*/
保证金:0;
}
应用程序工具栏{
/*工具栏是主标题,所以给它一些颜色*/
背景色:#1E88E5;
字体系列:“Roboto”,Helvetica,无衬线;
颜色:白色;
--应用程序工具栏字体大小:24px;
}
斯波克