Foxtable(狐表)用户栏目专家坐堂 → weui中的按钮固定


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

主题:weui中的按钮固定

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


加好友 发短信
等级:五尾狐 帖子:1064 积分:7581 威望:0 精华:0 注册:2009/6/24 9:44:00
weui中的按钮固定  发帖心情 Post By:2024/7/15 19:43:00 [显示全部帖子]


图片点击可在新窗口打开查看此主题相关图片如下:img_0529(20240714-214200).png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:222.png
图片点击可在新窗口打开查看

想把这三个按钮固定不动。
wb.InsertHTML("<style>form1{position: fixed;}</style>")

wb.AddForm("page1", "form1", "select.htm")

With wb.AddButtonGroup("form1", "btn", False)
    With .Add("btn1", "团课", "button") '自定义按钮
        .Attribute = """
    End With 
    With .Add("btn2", "精品课", "button")
        .FormAction = ""
        .Attribute = """
    End With
    With .Add("btn3", "私教课", "button")
        .FormAction = ""
        .Attribute = """
    End With 
End With

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


加好友 发短信
等级:五尾狐 帖子:1064 积分:7581 威望:0 精华:0 注册:2009/6/24 9:44:00
  发帖心情 Post By:2024/7/15 20:43:00 [显示全部帖子]

Dim e As RequestEventArgs = args(0)
Dim wb As New weui


Dim openid As String = "oZASJ6FcC0KCnfJ-U9tZT8RU9iqs"

wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>", True) 
wb.AppendHTML("<script src='./weui/exweui.js' ></script>", True)
wb.InsertHTML("<style>.weui_tabbar_item{background-color: #e5f2ff;}</style>") '设置页面顶部颜色
'wb.InsertHTML("<style>.weui_navbar{background-color:blue;}</style>") '设置导航栏背景色
wb.InsertHTML("<style>.exui-scrolltab-item{background-color:#e5eeff;}</style>") '设置侧边栏颜色
With wb.AddTabBar("", "tb1", 1) 
    .AddPage("page1", "欢迎选课").Attribute = "style='height:100%'" '这个style必须设置,不然无法返回页面
    .AddPage("page9", "历史信息")
    '    .AddButton("bt1", "个人信息", "./images/user.png", "default.htm")  
End With

'Functions.Execute("default", wb, e) '执行主页面函数
wb.InsertHTML("<style>.weui_tabbar_label{font-size: 18px;color:green;}</style>") '主标题字体大小
'wb.InsertHTML("<style>form1{position: fixed;}</style>")

wb.AddForm("page1", "form1", "select.htm")

With wb.AddButtonGroup("form1", "btn", False)
    With .Add("btn1", "团课", "button") '自定义按钮
        .Attribute = """
    End With 
    With .Add("btn2", "精品课", "button")
        .FormAction = ""
        .Attribute = """
    End With
    With .Add("btn3", "私教课", "button")
        .FormAction = ""
        .Attribute = """
    End With 
End With
 
Dim riqi(7) As Date
Dim st(7) As String
Dim xingqi(7) As String
For i As Integer = 1 To 7
    riqi(i) = Date.today.AddDays(i - 1)
    st(i) = format(riqi(i), "M.dd")
    xingqi(i) = riqi(i).DayOfWeek
  
Next 



Dim tab As ExWeUI.ExSideTab = ExWeUI.WebUI.AddSideTab("", "stab1", 1) 
tab.AddPage("st1", "今日", "renamecxtq.htm?type=tuanke&riqi=" & riqi(1), "./images/fish-and-chips.png", True)
tab.AddPage("st2", "明日", "renamecxtq.htm?type=tuanke&riqi=" & riqi(2), "./images/fish.png")
tab.AddPage("st3", st(3), "renamecxtq.htm?type=tuanke&riqi=" & riqi(3), "./images/vegetables.png")
tab.AddPage("st4", st(4), "renamecxtq.htm?type=tuanke&riqi=" & riqi(4), "./images/rice.png")
tab.AddPage("st5", st(5), "renamecxtq.htm?type=tuanke&riqi=" & riqi(5), "./images/alcoholic-drink.png")
tab.AddPage("st6", st(6), "renamecxtq.htm?type=tuanke&riqi=" & riqi(6), "./images/seafood.png")

tab.AddPage("st7", st(7), "renamecxtq.htm?type=tuanke&riqi=" & riqi(7), "./images/gift.png")

tab.AddPage("st8", "外卖", "renamecxtq.htm?type=tuanke&riqi=" & riqi(7), "./images/take-away.png")

'tab.AddPage("st7", "返回首页", "default.htm", "./images/07.png") 
wb.InsertHTML("page1", tab.BuildHtml)
wb.AddPage("", "page3").Attribute = "style='position: fixed;bottom: 0;left: 0;right:0;z-index:9999;'" '增加两个page



 wb.InsertHTML("<style>.exui-list-mes{background-color: SteelBlue;}</style>") 
wb.AddToast("", "tst1", "正在发送", 1)
wb.AddToast("", "tst2", "发送成功", 0)
wb.AddToast("", "tst3", "发送失败", 0).Icon = "warn"

With ExWeUI.WebUI.AddPopup("pop01", "preview.htm", 3)
    .Height = "70%"
    wb.InsertHTML("", .BuildHtml) 
End With 

wb.AppendHTML("<script src='./lib/ajaxform.js'></script>") '引入脚本文件
' wb.AppendHTML("<script >list3auto('" & id & "')</script>")  带变量示例
'wb.AppendHTML("<script >sendJsonObject('" & openid & "','chushi')</script>") '进入界面后提取下端
wb.InsertHTML("<div id='p1' style='margin:0.5em;z-index:9999;overflow:scroll;'></div>") '插入预览页面
wb.AppendHTML("<script>initExWeUI();</script>")

e.WriteString(wb.Build)

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


加好友 发短信
等级:五尾狐 帖子:1064 积分:7581 威望:0 精华:0 注册:2009/6/24 9:44:00
  发帖心情 Post By:2024/7/16 10:13:00 [显示全部帖子]

老师,我的意思是不想让这3个按钮随滚动条上下滚动,您给的代码是这个意思吗?

 回到顶部