Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个当前位于页面左侧的 TD。我希望 TD 滑入和滑出(带有动画)。.animate 适用于 div 但不适用于 TD。有什么好的方法吗?
td由于它们集成到表格模型中的方式,元素非常难以制作动画。我强烈建议使用div放置在里面的td代替。
td
div
<table> <tr> <td> <div>Foo</div> <!-- animate this element instead --> </td> </tr> </table>
或者更好的是,不要使用桌子。
不,不是。
表格单元格应该是表格的一部分,如果您尝试将其放置在其他位置,则效果不佳。