2

我正在使用 Flex-ratio 属性,但该属性不起作用。我正在分享我的代码。根据此链接,此属性在 Polymer 1.0 上运行良好。

<!DOCTYPE html>
<html lang="en">
<head>
 <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
 <link rel="import" href="bower_components/paper-button/paper-button.html">
 <link rel="import" href="bower_components/paper-input/paper-input.html">
 <link rel="import" href="bower_components/paper-car/paper-card.html">
 <link rel="import" href="bower_components/polymer/polymer.html">
 <link rel="import" href="bower_components/iron-icon/iron-icon.html">
 <link rel="import" href="bower_components/iron-icons/iron-icons.html">
 <link rel="import" href="bower_components/iron-flex-layout/iron-flex-layout-classes.html">
 <link rel="import" href="bower_components/iron-flex-layout/iron-flex-layout.html">

 <style is="custom-style" include="iron-flex"></style>
</head>
<body>

  <div class="horizontal layout">
    <div class="flex-2"><p>flex three</p></div>
    <div class="flex-1"><p>flex</p></div>
    <div class="flex-2"><p>flex two</p></div>
   </div>

</body>
</html>
4

1 回答 1

1

iron-flex-factors我自己犯了这个错误....需要导入<style include="iron-flex iron-flex-factors iron-flex-alignment">

于 2017-02-18T00:18:45.907 回答