Home > Back-end >  Specify color of class using Javascript
Specify color of class using Javascript

Time:04-17

Refering to a live codepen demo at enter image description here

 .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>';
  • Related