如何使模型查看器背景透明而不是默认的白色 HTML CSS

问题描述

对于我使用的任何 3D 模型,我的模型查看器 3D 预览器始终具有白色背景。我尝试使用另一种纯色的天空盒图像,设置背景颜色 = 透明,但它仍然总是白色。有谁知道如何在 html/css 中解决这个问题?也许将它包装在一个容器中并编辑容器 css 而不是模型查看器?谢谢!

    <model-viewer
      src="file.glb"
      ios-src="file.usdz"
      ar-modes="webxr scene-viewer quick-look"
      camera-controls
      loading="eager"
      auto-rotate
      auto-rotate-delay="0"
      shadow-intensity="0"
      ar 
      interaction-policy="always-allow"
      interaction-prompt-threshold="0"
      interaction-prompt-style="wiggle">

这是一些 CSS:

model-viewer {
  min-height: 50px;
  height: 80%;
  width: 90%;
  position: fixed;
  padding: 60px;
  align-items: center;
  text-align: center;
  justify-content: center;
  display: flex;  }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)