您的位置:首页技术文章
文章详情页

angular.js - AngularJS link函数里调用CSS transition transform 是瞬发的,

浏览:33日期:2023-07-27 15:02:32

问题描述

link: function(scope, element, attrs) { element.parent().find(’.right’).css({’transition’: 'all 0.6s linear 0s',’transform’:'rotate(180deg)' });} 页面显示直接就转了180度,没有0.6秒的效果。

问题解答

回答1:

这么写试试呢?

element.parent().find(’.right’).css({’transition’: 'all 0.6s linear 0s'});setTimeout(function(){ element.parent().find(’.right’).css({’transform’: 'rotate(180deg)'});});

标签: CSS
相关文章: