Is it possible at all to use jquery or jquery ui to animate an unordered list from display block to display inline. So the list will sm开发者_如何学JAVAoothly transform to inline?
Yes, it's possible. No, there isn't a nice, simple, built-in way.
Such a call to animate() would be valid. But which result may we expect? Animation of "top" from 0 to 1000 in 100 steps increases top by 10 each step. What are the "steps" /"slices" between block and inline?
I know this is a very old question but for people who are looking at this thread, you can add a custom animation to the block property now.
.subnav-is-opened .main-nav__secondary-nav {
display: block;
-webkit-animation: showNav 250ms ease-in-out both;
-animation: showNav 250ms ease-in-out both;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes myfirst {
from {opacity: 0;}
to {opacity: 1;}
}
Demo - https://developers.google.com/web/fundamentals/
精彩评论