i want to have this button effect on my website, theres an example on http://www.ohlife.com when you click the signup, for free green button , it deos this kool effect(it pushes back)!!, i hope i make sense!!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Basically this just uses a background sprite image and defines different states through some jQuery. If you look at the background image for the button http://ohlife.com/img/static/signup/btn_signup.gif You’ll see the different states involved. In essence the CSS statement will define each state by just changing the position of the background image. i.e.
In the jQuery you can then specify the addition of classes for different mouse events, for instance:
Note – the code here is untested but should give you the general idea of what to do.