I want to have inner glow effect of button when focused. I could achieve outline (outer) glow of button but I even want to have inner glow effect. Could anyone help?
Asked
Active
Viewed 6.9k times
2 Answers
40
I made a jsFiddle showing this effect:
a {
-webkit-box-shadow: inset 0 0 30px #00f;
-moz-box-shadow: inset 0 0 30px #00f;
box-shadow: inset 0 0 30px #00f;
}
Edit: in response to your comment: Here's a much sexier version.

thirtydot
- 224,678
- 48
- 389
- 349
-
i get inner glow effect with this thanks for your help. as i already mentioned i need to have both inner glow and outer glow together.if i include " -webkit-box-shadow: inset 0 0 30px #00f;" along with -webkit-box-shadow: 0 0 30px #00f;i can only see inner glow but not outer glow. – rashmi Jan 10 '11 at 04:45
-
-
2022 and "-moz-box-shadow" will give you a warning in FireFox 'Unknown property ‘-moz-box-shadow’. Declaration dropped.' Seems Chrome doesn't mind though. – Shaedo Mar 06 '22 at 17:43
3
use box-shadow
inset
:
.class{
box-shadow:inset 2px 2px 2px 2px black;
}

crodjer
- 13,384
- 9
- 38
- 52
-
-
1yeah thats why provided the css3.info linke. CSS3 work is still under progress, yet the features like `box-shadow`, `border-radius` are implemented by major browsers (I don't consider IE as a browser) – crodjer Jan 07 '11 at 11:54
-