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