在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颜色)。

相关推荐
于慨10 小时前
Capacitor
前端
IT凝冬10 小时前
liunx 的 centos7 安装ngin
前端
赵锦川10 小时前
大屏比例缩放
前端·javascript·html
于慨11 小时前
tauri
java·服务器·前端
贼爱学习的小黄11 小时前
NC BIP参照开发
java·前端·nc
小江的记录本11 小时前
【MyBatis-Plus】MyBatis-Plus的核心特性、条件构造器、分页插件、乐观锁插件
java·前端·spring boot·后端·sql·tomcat·mybatis
光影少年11 小时前
如何进行前端性能优化?
前端·性能优化
Dxy123931021612 小时前
js如何把字符串转数字
开发语言·前端·javascript
爱写bug的野原新之助12 小时前
爬虫之补环境:加载原型链
前端·javascript·爬虫
陈广亮12 小时前
工具指南7-Unix时间戳转换工具
前端