html - Css hover button effect -


look @ fiddle js fiddle when hover(:hover) background changes when clicked (:active) box-shadow not changed dont know why ? not happen if button not change background on hover !

in fiddle want somehthing combination of button 1 , button 2

.white-button {     background: #fff;     font-weight: normal;     color: #3b3b3b;     border: 1px solid #ddd;     box-shadow: 0 0 2px #ccc;     font-family: mv boli,tahoma;     margin: 5px;     padding: 5px 10px 5px 10px;     font-size: 15px; } .positive:enabled:hover {     background: #99cd30;     box-shadow: inset 2px -7px 11px rgba(80, 92, 51, 0.17)!important; } button:active {     border-bottom-color: #999;     box-shadow: inset 0 3px 3px rgba(0, 0, 0, .2); } .gray-button{     background:#eee;     padding:5px 10px;       border: 1px solid #999;     border-bottom-color: #888; } 

for cant under stand!

as see there 3 buttons on fiddle name like lets button a,b , c respectively.

  • now when hover a green background inset box-shadow .
  • when hover b green background no inset shadow
  • when hover c nothing

  • when click a remains same

  • when click b inset shadow created
  • when click c an inset shadow created

now button want d want

  • when hover d green background inset
    box-shadow
    .
  • when click d inset shadow created replacing previous one.

    but not happen dont know why ?

i hope how want it..

http://jsfiddle.net/rahulrulez/m2f9f/3/

i played properties !important

.white-button { background: #fff; font-weight: normal; color: #3b3b3b; border: 1px solid #ddd; box-shadow: 0 0 2px #ccc; font-family: mv boli,tahoma; margin: 5px; padding: 5px 10px 5px 10px; font-size: 15px; }  .positive4:hover { background: #99cd30; box-shadow: inset 2px -7px 11px rgba(80, 92, 51, 0.17); }  .positive4:active { border-bottom-color: #999; box-shadow: inset 0 3px 3px rgba(0, 0, 0, .2) !important;     } 

i hope answers question


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -