我已经多次这样做了,没有问题,但由于某种原因,这在Here上是个问题。向下滑动将开始正常工作(1/3),然后突然猛拉并完成动画。向上滑动效果很好。奇怪的是,slideDown()、slideToggle 和 .animate() 就是这种情况,如果我还在动画函数中切换不透明度,它不会抖动,但我的文本会短暂改变颜色。
HTML:
<h2>Phthalate Free: </h2><div class="yamikowebsToggler">
<p>
Dibutyl Phthalate is linked to cancer and is present in nail polish, perfume, soft plastics and skin care products.
</p></div>
CSS:我读到的其他内容是边距会导致抖动,但这无济于事
h2{color:#76DEFC; margin:0px;}
.yamikowebsToggler{margin:0px;}
p{margin:0px; color;#000000;}
查询:
$(document).ready(function(){
$(".yamikowebsToggler").fadeOut(0);
$("h2").click(function()
{
$(this).next(".yamikowebsToggler").stop(true, true).animate(
{ height: 'toggle' },
{
duration: 1000,
});
})
});