繁体   English   中英

Ionic v6 透明体 (@capacitor/google-maps)

[英]Ionic v6 transparent body (@capacitor/google-maps)

在文档中,您可以阅读“...作为开发人员,您必须确保 webview 从各层一直透明到最底层” 我已经用谷歌搜索了,但没有找到解决方案。 就我而言,如果我将其设置为透明,它会起作用,但我能找到的唯一方法是更改 --ion-background-color: transparent; 在 variables.css 中,但这会影响许多其他元素,需要新的 CSS 来更正背景。

有没有办法只改变身体透明?

在有人问之前,我已经尝试过:

ion-content { --background: none; }
ion-content { --background: transparent; }
:root { --background: transparent; }
document.getElementsByTag('body') /*and then changing the style but in Android doesn't work*/

还有一些我可能在这里遗漏的。

这对我有用

ion-content {
  --background: transparent;
}

body {
  background: transparent;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM