Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inner glow effect of button

Tags:

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?

like image 413
rashmi Avatar asked Jan 07 '11 11:01

rashmi


People also ask

What does inner glow do?

Inner Glow is one of the lesser-used effects within Photoshop layer styles, but that doesn't mean it isn't useful. On top of creating a glowing effect, Inner Glow can also be used to simulate an embossed or cut-out effect, to create some depth within your styles, or to add an inner stroke to your design.

How do you add a glow effect to a button in CSS?

In order to have this glow animation only when user hovers over the button, we are using the CSS selector :hover . If you need to have a permanent glow effect on the button, all you need to do is to remove this :hover selection from the glow-button definition.


2 Answers

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.

like image 126
thirtydot Avatar answered Sep 25 '22 22:09

thirtydot


use box-shadow inset:

.class{
  box-shadow:inset 2px 2px 2px 2px black;
}

http://www.css3.info/preview/box-shadow/

like image 22
crodjer Avatar answered Sep 24 '22 22:09

crodjer