Foxtable(狐表)用户栏目专家坐堂 → weUI中grid每行的数量如果控制?


  共有3156人关注过本帖树形打印复制链接

主题:weUI中grid每行的数量如果控制?

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109489 积分:557107 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/9/7 10:36:00 [显示全部帖子]

Select Case e.Path
    Case "test.htm"
        Dim wb As New WeUI
        wb.AppendHTML("<style>.weui_grid{width: 25%;}</style>",True) '每个格子1/4
        wb.AddPageTitle("","pageheader","WeUI","微信网页设计样式库")
        With wb.AddGrid("","g1")
            .Add("c1","Button", "./images/button.png").Attribute = ""
            .Add("c2","Cell", "./images/cell.png", "http://www.foxtable.com")
            .Add("c3","Toast", "./images/toast.png", "http://www.foxtable.com")
            .Add("c4","Dialog", "./images/dialog.png", "http://www.foxtable.com")
            .Add("c5","Progress", "./images/progress.png", "http://www.foxtable.com")
            .Add("c6","Msg", "./images/msg.png", "http://www.foxtable.com")
            .Add("c7","Article", "./images/article.png", "http://www.foxtable.com")
            .Add("c8","ActionSheet", "./images/actionSheet.png", "http://www.foxtable.com")
            .Add("c9","Icons", "./images/icons.png", "http://www.foxtable.com")
            .Add("c10","Panel", "./images/panel.png", "http://www.foxtable.com")
            .Add("c11","Tab", "./images/tab.png", "http://www.foxtable.com")
            .Add("c12","SearchBar", "./images/search.png", "http://www.foxtable.com")
        End With
        e.WriteString(wb.Build)
End Select

如果要自适应
wb.AppendHTML("<style>@media (min-width: 640px) {.weui_grid{width: 25%;}</style>",True) '当页面宽度大于640时设置为一行4格


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109489 积分:557107 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/9/7 21:36:00 [显示全部帖子]


 回到顶部