ul{
list-style: none;
}
div {
user-select: none;
}
.box {
width: 100%;
overflow: hidden;
background-repeat: no-repeat;
background-size: 100%;
background-attachment: fixed;
}
<div class="box"></div>
// 创建json文件数据,并获取
let data;
let xhr = new XMLHttpRequest();
xhr.open('get', 'js/树形菜单.json');
xhr.send();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
let text = xhr.respons