console
let achor = document.getElementById('achor');
console.log(achor)
setTimeout(()=>{
let SVG = achor.previousElementSibling;
console.log(5,SVG);
let icons = SVG.childNodes
icons.forEach(icon=>{
let svg = document.createElementNS('http://www.w3.org/2000/svg','svg') ,
use = document.createElementNS('http://www.w3.org/2000/svg','use') ,
iconId = icon.id
use.href.baseVal = `#${iconId}`
svg.appendChild(use)
svg.setAttribute('class','icon '+iconId)
achor.appendChild(svg)
})
},2e3)
<div id='achor'> achor</div>
.icon{
width:1rem;
height:1rem;
}
.icon-zhongdianwanliuhuiyuan{
fill:#fff;
}