Refering to a live codepen demo at
.red-dot {
position:absolute;
width:55px;
height:55px;
background:blue;
pointer-events: none;
clip-path: polygon(57% 0, 58% 48%, 75% 49%, 49% 100%, 22% 49%, 39% 48%, 39% 0);
}
CodePudding user response:
You can use this:
newDot.style.background = '<your background here>';