当我在设备上 运行 时,为什么我的按钮是透明的?
Why are my buttons transparent when I run on my device?
所以我在我的应用程序中为我的按钮上色了。当我 运行 在我的 PC 上的本地服务器上时,颜色工作正常,但是当我部署到我的设备 (Android) 时,所有按钮都是透明的。
在我的 variables.scss 中它看起来像这样:
ion-button{
--background: #a37001e8;
--background-activated: #e9c067e8;
color: white;
}
ion-button{
--background: rgba(163, 112, 1, 1);
--background-activated: rgba(233, 192, 103, 1)
color: white;
}
对于十六进制颜色的 alpha 使用,浏览器尚不完全支持。使用 rgba() 函数只接受 R、G、B、A(红、绿、蓝、Alpha)格式的值。 https://ionicframework.com/docs/theming/advanced#the-alpha-problem
所以我在我的应用程序中为我的按钮上色了。当我 运行 在我的 PC 上的本地服务器上时,颜色工作正常,但是当我部署到我的设备 (Android) 时,所有按钮都是透明的。
在我的 variables.scss 中它看起来像这样:
ion-button{
--background: #a37001e8;
--background-activated: #e9c067e8;
color: white;
}
ion-button{
--background: rgba(163, 112, 1, 1);
--background-activated: rgba(233, 192, 103, 1)
color: white;
}
对于十六进制颜色的 alpha 使用,浏览器尚不完全支持。使用 rgba() 函数只接受 R、G、B、A(红、绿、蓝、Alpha)格式的值。 https://ionicframework.com/docs/theming/advanced#the-alpha-problem