1

我有显示 3d 模型的代码。当用户开始移动对象时,模型周围会出现黑色轮廓。我如何摆脱这个黑色轮廓?这是我的代码:

    <model-viewer  id="testModel" style="width: 700px; height: 700px; outline: 0;border: none;box-shadow: none;outline-width: 0px;" src="B - Oshrat -  2- SF35OP2 - 2 PIPING LINES binary/H - Oshrat - SEAMLESS LES GALOON v7_Colorway 2.glb" alt="A 3D model of an astronaut" shadow-intensity="1"  ar ar-modes="webxr" auto-rotate camera-controls></model-viewer>
    <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.js"></script>
  <script  nomodule src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js"></script>

这是我的CSS:

    *:active{
  outline: 0;
  border: none;
    box-shadow: none;
    outline-width: 0px;
}
*:focus{
    outline: 0;
  border: none;
    box-shadow: none;
    outline-width: 0px;
}
*:visited{
    outline: 0;
  border: none;
    box-shadow: none;
    outline-width: 0px;
}

在此处输入图像描述

4

2 回答 2

2

  <script src="https://unpkg.com/focus-visible@5.1.0/dist/focus-visible.js"></script>

在您的 HTML 标头中。

这是根据https://github.com/google/model-viewer/pull/660的修复

于 2021-01-14T12:29:46.570 回答
0

可能是因为大纲:0;应该是大纲:无;

于 2020-06-04T06:57:00.180 回答