I am attempting to create a spider's web effect under an <hr />
element, but I am encountering difficulties with the circular parts.
Instead of using SVG, I want to style the hr
element so that the web appears under all instances of it, without requiring additional HTML elements.
Below is a rough depiction of what I am aiming for:
Desired Outcome
Something similar to the image shown here:
Current Code
My current approach to creating the 'spindles' between the pseudo elements involves the following CSS:
html{
margin:0;
padding:0;
background:rgba(0,0,0,0.1);
color:black;
}
hr{
height:30px;
border-bottom:none;
border-right:none;
position:relative;
}
hr:before, hr:after{
content:"m";
position:absolute;
height:40px;
width:1px;
top:0;
left:0;
transform-origin:top left;
transform:rotate(-20deg);
background:black;
}
hr:after{
transform:rotate(-40deg);
}
<hr />
However, this method results in overlapping 'm's and does not achieve the desired effect.
Past Attempts
I have experimented with using different letters in the
content
property of the pseudo elements.I have also tried incorporating curves and overflow hidden properties, but these attempts were unsuccessful.
Any suggestions or solutions would be greatly appreciated. If achieving this with pure CSS is possible, that would be ideal! Currently, I am struggling to find a method to attain this level of functionality.