png 图像在 css ionic 中使背景颜色变黑
png image make background color black in css ionic
我正在使用 css 和 ionic 。在背景中使用图像,但是当我使用制作背景的图像时 black.without 图像看起来不错。
ion-content {
--background: url("/assets/product_background.png") 0 0/100% 95% no-repeat;
--ion-background-color: linear-gradient(to bottom, #1a1240 35%,#6528af 70%,#736eed 100%);
}
With Background image
without background image
只需将您的所有属性添加到 --background
值即可。
你的情况:
--background: url("/assets/product_background.png") 0 0/100% 95% no-repeat, linear-gradient(to bottom, #1a1240 35%, #6528af 70%, #736eed 100%);
这将添加您的图像,然后包括您的渐变。
我正在使用 css 和 ionic 。在背景中使用图像,但是当我使用制作背景的图像时 black.without 图像看起来不错。
ion-content {
--background: url("/assets/product_background.png") 0 0/100% 95% no-repeat;
--ion-background-color: linear-gradient(to bottom, #1a1240 35%,#6528af 70%,#736eed 100%);
}
With Background image
without background image
只需将您的所有属性添加到 --background
值即可。
你的情况:
--background: url("/assets/product_background.png") 0 0/100% 95% no-repeat, linear-gradient(to bottom, #1a1240 35%, #6528af 70%, #736eed 100%);
这将添加您的图像,然后包括您的渐变。