项目场景:
主要是vue与three结合,在three加载的窗口上添加DIV
主要代码:
<div class="controls-box">
<el-button type="primary" class="controls-button" size="mini" @click="threeD">3D视图</el-button>
<el-button type="primary" class="controls-button" size="mini" @click="twoD">2D视图</el-button>
</div>
在全局样式中添加一下代码
.controls-box {
position: absolute;
right: 8px;
top: 47px;
width: 100px;
height: 60px;
padding: 4px;
background-color: rgb(8, 8, 8);
border: 1px solid #0e0d0d;
}
.controls-button {
margin: 2px 7px;
}