首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >弹性比在聚合物^1.7.0中不起作用?

弹性比在聚合物^1.7.0中不起作用?
EN

Stack Overflow用户
提问于 2016-12-13 13:48:56
回答 1查看 75关注 0票数 2

我正在使用Flex-ratio属性,但此属性不起作用。我正在分享我的代码。根据这个link,这个属性在聚合物1.0上工作得很好。

代码语言:javascript
复制
<!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>
EN

回答 1

Stack Overflow用户

发布于 2017-02-18 08:18:46

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41114464

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档