I am using a sunburst behind a unicode character (eye, 👁), with a CSS of:
.the-eye{
width:100%;
border-radius:50%;
box-shadow: 0 0 20px 10px #eeee11;
}
HTML:
<span class="the-eye">👁</span>
However, instead of a clean yellow background behind it, I see a white circle which appears to be rendered as part of the eye graphic. Is there a way to make that white part of the unicode transparent?
Verified on Chrome and Firefox.
3
Answers
from earlier comment:
demo below:
@Paulie_D is correct: set the
background-color
to the same as the shadow.To avoid the gap you just need to apply box shadow to an element with zero height and width, In this case another absolutely positioned span would do, and then set the z-index of that backdrop to -1 to fall under the icon.
This may not be the best solution but it is a solution, especially if support for older browsers is a concern.
[EDIT]
This can also work with pseudo elements