Javascript 如何显示聚合物对话框

Javascript 如何显示聚合物对话框,javascript,polymer-1.0,Javascript,Polymer 1.0,我正试图通过显示一个简单的消息对话框来开始使用Google的Polymer Paper Elements 1.0: <html> <head> <script src="scripts/polymer/webcomponentsjs/webcomponents.min.js"></script> </head> <body> <paper-dialog opened="true">Dialog test&

我正试图通过显示一个简单的消息对话框来开始使用Google的Polymer Paper Elements 1.0:

<html>
<head>
   <script src="scripts/polymer/webcomponentsjs/webcomponents.min.js"></script>
</head>
<body>

<paper-dialog opened="true">Dialog test</paper-dialog>

</body>
</html>

对话测试

“对话测试”字样出现在页面上,但没有对话。有人知道我遗漏了什么吗?

您遗漏了对
纸张对话框
元素定义的引用

<html>
    <head>
        <title>Example</title>
        <script src="path/to/webcomponentsjs/webcomponents-lite.js"></script>
        <link rel="import" href="path/to/paper-dialog/paper-dialog.html" />
    </head>
    <body>
        <paper-dialog opened="true">Dialog test</paper-dialog>
    </body>
</html>

例子
对话测试
包括正确的导入(
)将允许浏览器识别元素,并提供您期望的功能,包括行为和样式


有关使用web组件的交互式教程,您可以查看。

您需要包含这些元素的样式表。@Austinbrunkhost:您好!这是评论部分。评论是为了要求澄清。答案如下:↓↓↓↓↓↓@轻快的赛道是的!被动侵略@奥斯汀·布伦霍斯特:免费欢迎你information@LightnessRacesinOrbit嘿,谢谢你。很遗憾你没有一个♦ 在你的名字旁边。