jQuery Animation - Smooth Size Transition

前端 未结 8 2182
天命终不由人
天命终不由人 2020-11-28 07:30

So this might be really simple, but I haven\'t been able to find any examples to learn off of yet, so please bear with me. ;)

Here\'s basically what I want to do:

8条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 08:05

    Hello meyahoocoma4c5ki0pprxr19sxhajsogo6jgks5dt.

    You could wrap the 'content div' with an 'outer div' which is set to an absolute width value. Inject the new content with a "hide()" or "animate({width})" method, shown in the other answers. This way, the page doesn't reflow in between because the wrapper div holds a steady width.

提交回复
热议问题