時間:2020-10-29來源:www.www.newsthatmovesu.com作者:電腦系統城
ps: 懸浮固定在頁面的底部,并且背景有白色層將頁面底部文字的顯示遮罩,一面影響顯示觀感。且不受頁面下拉上提的影響。
wxml代碼如下:
?1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<!--底部按鈕的背景層--> <view class= "baise" ></view> <!--底部按鈕--> <view class= "anniu" > <button formType= "submit" class= "btn-normal btbdstk" bindtap= "resetSalaryBtnClick" > <view class= "bdstk" > <text >重置條件</text> </view> </button> <button formType= "submit" disabled= "{{disabled}}" class= "btn-normal btbdstk" > <view class= "sqdzk" > <text>確認查詢</text> </view> </button> </view> |
wxss樣式如下:
?1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
/* 底部按鈕 */ .baise{ background: #FFFFFF; display:flex; position:fixed; width:100%; height:150rpx; z-index:665; bottom:0rpx; } .anniu{ display:flex; position:fixed; width:95%; z-index:666; bottom:55rpx; } .btbdstk{ margin-left:30rpx; width:50%; } .bdstk{ font-size:30rpx; color: #ffffff; width:100%; border:2rpx solid #ffffff; border-radius:15rpx; background: #78B8FD; height: 95rpx; text-align: center; line-height:95rpx; } .sqdzk{ font-size:30rpx; color: #ffffff; width:100%; border:2rpx solid #ffffff; border-radius:15rpx; background: #FF7178; height: 95rpx; text-align: center; line-height:95rpx; } |
到此這篇關于微信小程序將頁面按鈕懸浮固定在底部的實現代碼的文章就介紹到這了
2020-11-11
Vue3 響應式偵聽與計算的實現2020-10-19
詳解mybatis-plus配置找不到Mapper接口路徑的坑2020-10-19
SpringBoot下使用MyBatis-Puls代碼生成器的方法