The rewritten title is: CSS 3 shapes: "Reverse Circle" or "Cut Circle"
P粉979586159
2023-08-24 18:26:55
<p>I want to create a shape that I would describe as an "anti-circle": </p>
<p>The image is somewhat inaccurate because the black line should continue along the outer border of the div element. </p>
<p>This is the demo I currently have: http://jsfiddle.net/n9fTF/</p>
<p>Is it possible to use <code>CSS</code> without images? </p>
I can't really tell from your plot how round you want the points to be, but there is one possibility: http://jsfiddle.net/n9fTF/6/
If the points need to be more rounded, you will need to place some circles on the ends so that they blend in with the spoon.
Update: CSS3 Radial Background Gradient Options
(For those browsers that support it - tested in FF and Chrome - IE10, Safari should also work).
One of the "problems" with my original answer was those situations without a solid background. This update creates the same effect, allowing a transparent "gap" between the circle and its reverse cutout.
View example fiddle.
CSS
Original answer
It took more effort than I expected to get the z-indexing to work properly ( this seems to ignore negative z-indexing ), however, this provides a nice clean Appearance (tested in IE9, FF, Chrome):
HTML
CSS