0

I want to add inset box shadow in progress bar I have added js I don't have an idea where I put the code "box-shadow: inset 2px 0px 80px #00000029" please help

function drawArc() {
        var circleStart = 1.5 * Math.PI;
        var circleEnd = circleStart + (newPercent / 50) * Math.PI;
        context.clearRect(0, 0, canvas.width, canvas.height);
        context.beginPath();
        context.arc(centerX, centerY, radius, circleStart, 4 * Math.PI, false);
        context.lineWidth = lineWidth;
        context.strokeStyle = "#ddd";
        context.stroke();
        context.beginPath();
        context.arc(centerX, centerY, radius, circleStart, circleEnd, false);
        context.lineWidth = lineWidth;
        context.strokeStyle = strokeStyle;
        context.stroke();

      }
SandyS
  • 129
  • 9
  • `#00000029` is not a valid hex-value that either has to be 3 or 6 digits long. In no case it can be 8 digits long. Despite of that, your question lacks details and clarity. I have no idea what you actually want to try to achieve. – tacoshy Aug 15 '21 at 10:50
  • 3
    @tacoshy it's valid, it's the 8 digit syntax that include opacity https://stackoverflow.com/questions/7015302/css-hexadecimal-rgba – Temani Afif Aug 15 '21 at 10:58
  • @TemaniAfif Thank you for the info. I stand corrected on this one! – tacoshy Aug 15 '21 at 11:01
  • Thanks for your reply and precious time...I have added #cccccc but where I put the code in js – SandyS Aug 15 '21 at 12:41

0 Answers0