Given a div, I want to "lock" / disable with a visual style. Previously there was a pattern similar to this
#box {
width: 200px;
height: 100px;
border: 1px solid;
background: repeating-linear-gradient(45deg, #1c71b8, #1c71b8 10px, #5fb5fc 10px, #5fb5fc 20px);
}
<div id="box">some content goes here, width and height are dynamic<br><br>it might take some space</div>
Now I want to strike through the div ( similiar to draw diagonal lines in div background with CSS ). I can only set the style of the element so it's not possible to add additional helper divs. I tried this
#box {
width: 200px;
height: 100px;
border: 1px solid;
background:
linear-gradient(to top left,
rgba(28, 113, 184, 0) 0%,
rgba(28, 113, 184, 0) calc(50% - 5px),
rgba(28, 113, 184, 1) 50%,
rgba(28, 113, 184, 0) calc(50% + 5px),
rgba(28, 113, 184, 0) 100%),
linear-gradient(to top right,
rgba(28, 113, 184, 0) 0%,
rgba(28, 113, 184, 0) calc(50% - 5px),
rgba(28, 113, 184, 1) 50%,
rgba(28, 113, 184, 0) calc(50% + 5px),
rgba(28, 113, 184, 0) 100%);
}
<div id="box">some content goes here, width and height are dynamic<br><br>it might take some space</div>
which is what I want but how can I remove the blurriness from the lines? There might be a time when I need to adjust the line thickness, e.g. changing it to 10px.