typescript 提示 Object is possibly ‘null‘ 的N种解决方法
https://blog.csdn.net/iamlujingtao/article/details/110573421
//添加闪烁点 只针对一个Marker
let newSpan = document.createElement('span')
newSpan.setAttribute('class', 'effectPoint effectPoint1')
if (newSpan) {
(document.querySelector('.BMap_Marker') as Element).appendChild(newSpan)
}
<style lang="scss">
.effectPoint {
width: 10px;
height: 10px;
background: #ff341e;
position: absolute;
z-index: 2;
border-radius: 50%;
left: 5px;
top: 16px;
}
.effectPoint1 {
animation: move 2s infinite linear;
}
@keyframes move {
from {
transform: scale(0);
}
to {
transform: scale(4);
opacity: 0;
}
}
</style>