Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make bevel and Embosed effect to button in CSS 3 for web-kit based browsers?

How to make bevel and Embosed effect to Submit button in CSS 3 ?

Like this.

enter image description here

Enlarged Imageenter image description here

I'm only considering Web-kit based browsers. and I'm not asking about How to give round corner and how to give gradient to button, I'm only asking about bevel effect

Html

<input type="submit" value="Submit your entry" class="input" />
like image 788
Jitendra Vyas Avatar asked Apr 22 '11 10:04

Jitendra Vyas


1 Answers

This is possible without the use of extra mark-up through the use of multiple box-shadows:

box-shadow: 
  0 1px 2px #fff, /*bottom external highlight*/
  0 -1px 1px #666, /*top external shadow*/ 
  inset 0 -1px 1px rgba(0,0,0,0.5), /*bottom internal shadow*/ 
  inset 0 1px 1px rgba(255,255,255,0.8); /*top internal highlight*/

enter image description here

http://jsfiddle.net/NPXfe/

like image 138
methodofaction Avatar answered Oct 19 '22 16:10

methodofaction