How to overlay HTML text/buttons on three.js?

前端 未结 2 927
有刺的猬
有刺的猬 2021-02-14 19:00

Ok, very new to three.js here but I am trying to achieve what Google has with https://beinternetawesome.withgoogle.com/interland

See - they have their F

2条回答
  •  后悔当初
    2021-02-14 19:42

    z-index only works with position property except for the case position: static and position: initial.

    This button class worked fine with my threejs scene. You can edit left, top accordingly.

    button {
        position: absolute;
        display: block;
        z-index: 99;
        left: 50%;
        top: 50%;
        }
    

提交回复
热议问题