微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Angular的Flex Layout

  • 使用 Angular Flex-Layout 輔助版面布局
  • 容器類 Containers
    • fxLayout
      • row:預設值,由左到右,從上到下
      • column:從上到下,再由左到右
      • row-reverse:與 row 相反
      • column-reverse:與 column 相反
      • wrap:多行
    • fxLayoutWrap
      • 控制容器內子元素的排版方式採用多行方式排列
    • fxLayoutGap
      • 控制容器內子元素的間隔
      • 設定值:可接受這些單位 %、px、vw、vh
    • fxLayoutAlign
      • 控制容器內子元素的對齊方式
      • 設定值
        • main-aixs: start、center、end、space-around、space-between
        • cross-axis: start、center、end、stretch
  • 子元素類 Child Elements within Containers
  • 特殊響應功能 Special Responsive Features
<div class="container"
     fxLayout="row"
     fxLayout.xs="column"
     fxLayoutAlign="center"
     fxLayoutGap="10px"
     fxLayoutGap.xs="0">
  <div class="item item-1" fxFlex="33">Item 1</div>
  <div class="item item-2" fxFlex="33">Item 2</div>
  <div class="item item-3" fxFlex="33">Item 3</div>
</div>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐