Button press effect not working in css

Riserken

New Member
I want to have this button pressed effect in css. I mean for example lets say I press a button then I want to change its css so that it looks pressed. Here is something that I tried. But it's not working. I used example from a site. But the button's size gets smaller and it looks different. Here is the link for the code http://jsfiddle.net/goku/GdD34/\[code\].pressed{ position:relative; top: 3px; color: #fqq; box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none;}input.happy { background-image: url(/img/happy.png); background-color: transparent; background-repeat: no-repeat; border: none; width: 64px; height: 64px; margin: 10px; cursor: pointer; border-radius:8px; -moz-border-radius:8px; -webkit-border-radius:8px; box-shadow: 0px 3px 5px #000; -moz-box-shadow: 0px 3px 5px #000; -webkit-box-shadow: 0px 3px 5px #000;}$('.happy').click(function() { alert('hello'); $('.happy').attr('class','pressed');});<input type="button" class="happy">\[/code\]
 
Back
Top