以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- TabBar滚动问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=98638) |
-- 作者:zhangjian222200 -- 发布时间:2017/4/3 15:58:00 -- TabBar滚动问题 如果页面比较长,滚动时TabBar随页面滚动 怎么样才能将TabBar固定显示在顶部或者页面底部?
|
-- 作者:有点蓝 -- 发布时间:2017/4/4 9:08:00 -- 本来就是固定的啊 |
-- 作者:zhangjian222200 -- 发布时间:2017/4/4 18:31:00 -- 页面高度大的时候,tabbar会随着页面滑到界面以外,不能固定显示在屏幕顶部 |
-- 作者:有点蓝 -- 发布时间:2017/4/4 19:53:00 -- 我测试没有问题,上例子说明 |
-- 作者:zhangjian222200 -- 发布时间:2017/4/4 20:10:00 -- 我这里用chrome浏览器,不过系统是xp,浏览器版本 49.0.2623.112,更新时间:2016年04月08日,估计是浏览器不更新造成的,因为针对xp不升级了 代码:(我电脑上,只要页面大于屏幕高度,tabbar就回到界面以外) Dim e As RequestEventArgs = args(0) \'首页 Select Case e.Path Case "index.htm" Dim wb As New weui With wb.AddTabBar("", "tb1", 1) \'使用TabBar,增加4个按钮(注:页面可以增加,但不考虑) .AddButton("bt1","首页","./images/a.png","http://www.foxtable.com") .AddButton("bt2","记录","./images/b.png","http://www.foxtable.com") .AddButton("bt3","设置","./images/c.png","http://www.foxtable.com") .AddButton("bt4","我的","./images/d.png","/personal.htm") .Attribute = "style=\'height:55px\'" End With For i As Integer = 1 To 5 With wb.AddArticle("","ar" & i) .AddImage("./images/00" & i & ".jpg") .Attribute = "style=\'padding:0.5em;\'" End With wb.AddForm("","form" & i,"test.htm") With wb.AddInputGroup("form" & i,"ipg" & i) .AddInput("xm" & i,"年龄","text") .AddInput("pw" & i,"城市","text") End With With wb.AddButtonGroup("form" & i,"btg" & i,False) .Add("btn1" & i, "查看TA的资料", "submit") End With Next \'With wb.AddButtonGroup("form1","btg4", False) \'总是键值相同,暂屏蔽处理 \'.Add("btns", "上一位").Kind = 1 \'.Add("btnx", "下一位").Kind = 1 \'End With e.WriteString(wb.Build) \'生成网页 End Select [此贴子已经被作者于2017/4/4 20:13:07编辑过]
|
-- 作者:有点蓝 -- 发布时间:2017/4/4 20:44:00 -- 用法不对 Select Case e.Path Case "index.htm" Dim wb As New weui With wb.AddTabBar("", "tb1", 1) \'使用TabBar,增加4个按钮(注:页面可以增加,但不考虑) .AddPage("bt1","首页","./images/a.png") .AddButton("bt2","记录","./images/b.png","http://www.foxtable.com") .AddButton("bt3","设置","./images/c.png","http://www.foxtable.com") .AddButton("bt4","我的","./images/d.png","/personal.htm") End With For i As Integer = 1 To 5 With wb.AddArticle("bt1","ar" & i) .AddImage("./images/00" & i & ".jpg") .Attribute = "style=\'padding:0.5em;\'" End With wb.AddForm("bt1","form" & i,"test.htm") With wb.AddInputGroup("form" & i,"ipg" & i) .AddInput("xm" & i,"年龄","text") .AddInput("pw" & i,"城市","text") End With With wb.AddButtonGroup("form" & i,"btg" & i,False) .Add("btn1" & i, "查看TA的资料", "submit") End With Next \'With wb.AddButtonGroup("form1","btg4", False) \'总是键值相同,暂屏蔽处理 \'.Add("btns", "上一位").Kind = 1 \'.Add("btnx", "下一位").Kind = 1 \'End With e.WriteString(wb.Build) \'生成网页 End Select |
-- 作者:zhangjian222200 -- 发布时间:2017/4/4 21:15:00 -- 楼上的这段代码 With wb.AddTabBar("", "tb1", 1) \'使用TabBar,增加4个按钮(注:页面可以增加,但不考虑) .AddPage("bt1","首页","./images/a.png") .AddButton("bt2","记录","./images/b.png","http://www.foxtable.com") .AddButton("bt3","设置","./images/c.png","http://www.foxtable.com") .AddButton("bt4","我的","./images/d.png","/personal.htm") End With 哦!我大概想到了,如果上述代码在***/personal.htm页面,上述代码中的 .AddButton("bt4","我的","./images/d.png","/personal.htm") 应该改为: .Addpage("bt4","我的","./images/d.png","/personal.htm") wb.AddPageTitle("bt4","pageheader","***","*******************") 这样就对了,跨页面是不可以引用的
[此贴子已经被作者于2017/4/4 21:26:24编辑过]
|
-- 作者:有点蓝 -- 发布时间:2017/4/4 21:20:00 -- 跨页面就没有意义了,只能都在当前页面做,不能使用其他页面的元素的。 |
-- 作者:zhangjian222200 -- 发布时间:2017/4/4 21:50:00 -- 发现1楼代码中的下面2处红色加上,页面就不显示了,去掉2处红色的,页面就出来了 是不是意味着暂时不支持,动态功能?
For i As Integer = 1 To 5 With wb.AddArticle("bt1","ar" & i) .AddImage("./images/00" & i & ".jpg") .Attribute = "style=\'padding:0.5em;\'" End With wb.AddForm("bt1","form" & i,"test.htm") With wb.AddInputGroup("form" & i,"ipg" & i) .AddInput("xm" & i,"年龄","text") .AddInput("pw" & i,"城市","text") End With With wb.AddButtonGroup("form" & i,"btg" & i,False) .Add("btn1" & i, "查看TA的资料", "submit") End With Next [此贴子已经被作者于2017/4/4 21:50:33编辑过]
|
-- 作者:有点蓝 -- 发布时间:2017/4/4 21:53:00 -- 要和page结合的,和什么动态没有关系 .AddPage("bt1","首页","./images/a.png")
|