How do I create a circle with a cut through it using CSS and an image in it? An example of what I want is shown below.Need a crossbrowser solution and with css not html.
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
- Issue with star rating css
You can use svg to draw a clipped circle and then rotate it.
fiddle: http://jsfiddle.net/j66xt2so/
The gradient background is a work around a strange behaviour of overflow:hidden
Sett the
border-radius:100%;
to all ways get a circular.added an
:after
to add the content we need to cancel out the part we don't want.You can do this by creating the circle using a pseudo-element and then skewing the container with
overflow: hidden
.The child pseudo-element is reverse skewed to make it appear as though it is not skewed at all.
See this Fiddle
you dont need any CSS and just requires three lines of html
Edit: Another thing I would like to add in, you can also show image inside the svg
And again, you don't even need css for that, and also it is highly cross browser compatible.