当前位置:   article > 正文

uniapp 修改tabBar图标大小和navigationBar字体大小(转载,仅作记录)_uniapp tabbar 图片尺寸设置

uniapp tabbar 图片尺寸设置

第一个

H5能用,实测微信小程序不能用,APP未测
//导航栏字体
.uni-page-head .uni-page-head__title {
	font-size: 15px !important;
}
// tab图标
.uni-tabbar .uni-tabbar__icon {
	width: 20px !important;
	height: 20px !important;
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

转自

第二个

未测

在项目根路径下的App.vue文件,增加以下代码:

<style lang="scss">

    uni-tabbar {
        .uni-tabbar { // tab背景
            background-image: linear-gradient(to top, #FAF8F8, #FFFFFF)!important; // tab背景图片或者渐变色,背景色和背景图片最多选择一个进行设置
            .uni-tabbar-border { // tabBar上边框
                background-color: #F7F4F4!important; // tabBar上边框的颜色
            }
            .uni-tabbar__bd { // tabBar单项
                .uni-tabbar__icon { // 图标
                    width: 48upx!important;
                    height: 48upx!important;
                }
                .uni-tabbar__label { // 文字
                    font-size: 20upx!important;
                }
            }
        }
    }
</style>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

转自

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/245932
推荐阅读
相关标签
  

闽ICP备14008679号