0
新手在web开发。 试图做tutorial如果聚合物 - 并实现一个简单的元素。聚合物 - 在实施一个简单的元素失败
的index.html
<!doctype html>
<html>
<head>
<title>My Test</title>
<script src="./components/platform/platform.js"></script>
<link rel="import" href="my-element.html">
<style>
div { width: 300px;}
my-element { font: bold 16px cursive;}
</style>
</head>
<body>
<div>
<my-element></my-element>
</div>
</body>
</html>
我-element.html
<polymer-element name="my-element">
<template>
<div>
<p>rtrthdfghdfghdfghdgsdfasdfa</p>
</div>
</template>
</polymer-element>
没有任何反应在屏幕上。 使用chrome SDL检查所有资源都已加载好(200)。
这是渲染后的页面源:
<!doctype html>
<html>
<head>
<title>My Test</title>
<!-- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> -->
<script src="./components/platform/platform.js"></script>
<link rel="import" href="my-element.html">
<style>
div { width: 300px;}
my-element { font: bold 16px cursive;}
</style>
</head>
<body>
<div>
<my-element></my-element>
</div>
</body>
</html>
什么,我做错了什么?
感谢它现在正在工作。 – user1025852