css3 - Change CSS Transition Property Behaviour -
css3 - Change CSS Transition Property Behaviour -
ul.nav { list-style: none; display: block; width: 200px; position: relative; top: 10px; left: 300px; padding: 10px 0 10px 10px; background: url(shad2.png) no-repeat; background-position:right; } ul.nav li { -moz-transition: 0.3s ease-out; -o-transition: 0.3s ease-out; -webkit-transition: 0.3s ease-out; background: #005a9c url(border.png) no-repeat; background-position: right; color: #ffffff; padding: 7px 15px 7px 20px; border-top-left-radius: 10px; border-bottom-left-radius: 10px; -webkit-border-top-right-radius: 10px; -webkit-border-bottom-right-radius: 10px; width: 100px; display: block; text-decoration: none; -webkit-box-shadow: 2px 2px 4px #888; box-shadow: 2px 2px 4px #888; } ul.nav li a:hover { background: #ebebeb url(border.png) no-repeat; color: #005a9c; padding: 7px 15px 7px 30px; }
the above css transition produces transition moves left right on each li a. how reverse transition effects move right left. looks default css3 property.
change padding
:
ul.nav li { ... padding: 7px 15px 7px 30px; } ul.nav li a:hover { ... padding: 7px 35px 7px 20px; position:relative; left:-20px;
}
demo
css css3 css-transitions
Comments
Post a Comment