html - CSS3 transitions time issue -
well im working on little php script , have problem when using trantions css3 proprety.when utilize transition dont know why works fine when user hover button , takes 1s alter background when user move mouse out of button doesnt take 1s changes instantaly. demo
.b{ width:100%; } .b:hover{ background:#fff; transition: 1s; } <button class="b">hover me</button>
put transition on base of operations state , work both ways.
edit: browsers require base of operations values transition to/from. also, wouldn't set transition without defining transitioning.
also, tend not transition shortcut properties. ideally, should transitioning background-color only.
.b{ width:100%; transition:background-color 1s; } .b:hover{ background-color:#fff; }
jsfiddle demo - revised
html css css3
No comments:
Post a Comment