美文网首页
uniapp实现动态的渐变色

uniapp实现动态的渐变色

作者: 我是七月 | 来源:发表于2024-03-20 09:30 被阅读0次
渐变色
需要在style里面进行添加,但是使用background-color,居然不起作用,不知道为什么😓
最后发现使用background-image可以实现👍🏻
<view :style="{ color: themeColor,backgroundImage: `linear-gradient(to right,${themeBgColor}, ${backgroundRightColor})`,'background-color': themeBgColor  ,height:navbarHeight}">

</view>
成功解决,重写uni-nav-bar实现的顶部导航栏渐变色,下面从左到右的渐变色,两边颜色色值差异不是很大😄

相关文章

网友评论

      本文标题:uniapp实现动态的渐变色

      本文链接:https://www.haomeiwen.com/subject/dlkxtjtx.html