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.
我正在使用 jQTouch 来显示表格列表。当单击一个单元格(实际上是<li>jQTouch 中的一个标签)时,我想将单元格的高度设置为 0,然后隐藏该元素。
<li>
我曾尝试为此使用 jquery.animate(),它适用于 firefox/chrome/opera,但在 iPhone 上速度非常慢。
有谁知道如何使用 -webkit-animate (或一些 iPhone 兼容的框架,如 jQTouch)来做到这一点?
谢谢,布雷特
CSS:
-webkit-transition-property: height; -webkit-transition-duration: 0.5s;
JS:
$('element').css('height', 0).bind('webkitTransitionEnd', function() { $(this).hide(); }); ;