Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I really like this text effect with an inset shadow, however because of the spread, it's also overflowing past the boundaries of each character. Is there any way to cause the shadow to just be on the inside of each character?

CSS
#text
{
        font: bold 64px 'Open Sans';
        color: transparent;
        background-color: black;
        text-shadow: 0px 0px 20px rgba(255,255,255,0.5);
        -webkit-background-clip: text;
        -moz-background-clip: text;
        background-clip: text;
}


Preview: here[^]

What I have tried:

Adding another shadow the same colour as the background, didn't have any effect
Posted
Updated 19-Feb-18 9:37am

1 solution

 13
down vote
favorite
3
	

I am trying to achieve a gradient + text shadow effect in Chrome/Safari using CSS text-shadow and a combination of text-shadow and background-image: -webkit-gradient, see example blw. I can only make one of the effects apply(if I add the shadow the gradient disappears. What am I doing wrong?

h1 {
font-size: 100px;
background-image: -webkit-gradient(linear, left top, left bottom, from(white), to(black));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 1px 1px #fff;
}
 
Share this answer
 
Comments
[no name] 19-Feb-18 14:11pm    
You’ve been told multiple times to stop asking questions on other people’s threads.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900