123s
V2EX  ›  问与答

前端新内容 append 怎么做 css 动画啊

  •  
  •   123s · Jun 21, 2016 · 3288 views
    This topic created in 3818 days ago, the information mentioned may be changed or developed.
    我的是 html string 直接用 jq insert 进去的。
    7 replies  •  2016-06-21 10:50:33 +08:00
    XianZaiZhuCe
    XianZaiZhuCe
    Jun 21, 2016 via iPhone
    1
    你知道 jquery 怎么设置 css 不?
    Light3
    Light3
    Jun 21, 2016
    2
    jquery .css()?
    ziki
    ziki
    Jun 21, 2016
    3
    append 之后再手动把动画类加上?
    123s
    123s
    OP
    Jun 21, 2016
    4
    @ziki 我试试
    allce231
    allce231
    Jun 21, 2016
    5
    注意回流&重绘
    hahamy
    hahamy
    Jun 21, 2016
    6
    你就把他当普通 css 动画处理就行
    先 append ,再把动画类加上,如果 ios 里不播放动画,或者动画一瞬间就播完了,或者卡顿,那么就延迟下
    setTimeout(function(){
    $(".xxx").addClass("animated");
    },100)
    123s
    123s
    OP
    Jun 21, 2016
    7
    @allce231 怎么优化
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2002 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:12 · PVG 20:12 · LAX 04:12 · JFK 07:12
    ♥ Do have faith in what you're doing.