在uniapp中使用背景渐变色与背景图不生效问题

list上有文字详情以及背景图,从背景可以看出是渐变色和 背景图片的结合。

因为使用到渐变色,所以要结合 background-blend-mode 属性来实现与背景图片叠加显示,否则只通过 background: linear-gradient(); background-image: url(); 设置不会生效,这样只能显示图片。

css 复制代码
 background-repeat: no-repeat;
		background-size: contain;
		background-image: 
 linear-gradient(180deg, #02AE81 0%, #01764A 100%),
 url('../../static/xxxx.png');
		background-position: right bottom;
		background-blend-mode: color-burn;

如果背景色不是渐变色,可以直接使用background-color: ; background-image: url();

background-blend-mode 属性定义了元素背景层的混合模式(background-image图片与background-color颜色)。

相关推荐
大怪v3 小时前
AI抢饭?前端佬:我要验牌!
前端·人工智能·程序员
新酱爱学习3 小时前
字节外包一年,我的技术成长之路
前端·程序员·年终总结
小兵张健4 小时前
开源 playwright-pool 会话池来了
前端·javascript·github
IT_陈寒6 小时前
Python开发者必知的5大性能陷阱:90%的人都踩过的坑!
前端·人工智能·后端
codingWhat7 小时前
介绍一个手势识别库——AlloyFinger
前端·javascript·vue.js
代码老中医7 小时前
2026年CSS彻底疯了:这6个新特性让我删掉了三分之一JS代码
前端
不会敲代码17 小时前
Zustand:轻量级状态管理,从入门到实践
前端·typescript
踩着两条虫7 小时前
VTJ.PRO 双向代码转换原理揭秘
前端·vue.js·人工智能
扉川川7 小时前
OpenClaw 架构解析:一个生产级 AI Agent 是如何设计的
前端·人工智能
远山枫谷7 小时前
一文理清页面/组件通信与 Store 全局状态管理
前端·微信小程序