【发布时间】:2016-01-01 02:04:03
【问题描述】:
我在网站开发过程中尝试使用 iron-flex-layout,当我花了几个小时试图让它工作但无济于事时变得非常沮丧。最终,我决定尝试一个简单的网页,看看它是否可以工作(认为它可能在我的网站中)。但是,我尝试了以下代码,但仍然无法正常工作!谁能发现我的错误?
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="bower_components/iron-flex-layout/iron-flex-layout.html">
<style>
body {
font-weight: 300;
}
div {
border: 2px solid grey;
background-color: white;
}
.layout {
margin-bottom: 20px;
background-color: grey;
}
p {
margin: 5px;
}
</style>
</head>
<body fullbleed unresolved>
<div class="horizontal layout">
<div><p>div</p></div>
<div class="flex"><p>flex (horizontal layout)</p></div>
<div><p>div</p></div>
</div>
</body>
</html>
【问题讨论】:
标签: flexbox polymer-1.0