开发手册 欢迎您!
软件开发者资料库

Framework7 - 布局网格

Framework7布局网格 - 从概述,环境,布局,导航栏,工具栏,搜索栏,状态栏,侧面板,内容块,布局网格,叠加层,预加载器,进度条,列表视图,手风琴,卡片,芯片,按钮开始学习Framework7 ,动作按钮,窗体,选项卡,Swiper滑块,照片浏览器,自动完成,选择器,日历,刷新,无限滚动,消息,消息栏,通知,延迟加载,颜色主题,细线,模板概述,自动编译,Template7页面,活动状态,点击保持事件,触摸波纹。

描述

Framework7提供了不同类型的网格类型,可根据用户需要放置内容.

布局网格提供不同类型的列大小如下表所示 :

S.No表类宽度
1col-5tablet-55%
2col-10tablet-1010%
3col-15tablet-1515%
4col-20tablet-2020%
5col-25tablet-2525%
6col-30tablet-3030%
7col -33tablet-3333.3%
8col-35t能够-3535%
9col-40tablet-4040%
10col-45tablet-4545%
11col-50tablet-5050%
12col-55tablet-5555%
13col-60tablet-6060%
14col-65tablet-6565%
15col-66tablet-6666.6%
16col-70tablet-7070%
17col- 75tablet-7575%
18col-80tablet-8080%
19col-85tablet-8585%
20col-90tablet-9090%
21col-95tablet-9595%
21col-100tablet-100100%
22col-autotablet-auto等宽

示例

以下示例提供了在Framework7中根据需要放置内容的网格布局;

                           Layout Grid                                                                                                      Layout Grid
               
                                                                                          Columns with gutter                                                                                             col 1                           col 2                                                                                                   col 1                           col 2                           col 3                           col 4                                                                                                   col 1                           col 2                           col 3                                                                        Columns without gutter                                                                                                         col 1                              col 2                                                                                                               col 1                              col 2                              col 3                              col 4                                                                                                               col 1                              col 2                              col 3                                                                                                Nested Columns                                                                                                                                                col 1                                                                     col 2                                    col 3                                                                                                                                                               col 1                                                                     col 2                                    col 3                                                                                                                                                                                                      Columns With Different Equal Width                                                                                                            col 1                              col 2                                                                                                                  col 1                              col 2                              col 3                              col 4                                                                                                                  col 1                              col 2                              col 3                              col 4                                                                                                      Columns With Equal Width                                                                                                            col-1                              col-2                              col-3                              col-4                                                                                                                  col-1                              col-2                              col-3                              col-4                                                                                                                                                                                          

输出

让我们执行以下步骤,看看上面给出的代码如何工作 : 去;

  • 将上面给出的HTML代码保存为服务器根文件夹中的 layout_grid.html 文件.

  • 将此HTML文件打开为http://localhost/layout_grid.html,输出显示如下所示.

  • 此代码提供了不同类型的网格类型,以根据用户需要放置内容.