【问题标题】:I want to add !important into animate我想将 !important 添加到动画中
【发布时间】:2015-07-22 11:09:59
【问题描述】:

可以在动画中添加 !important 吗? 我尝试在 Angular 中添加这样的内容:

angular.element(".myClassName").css("margin-left","100px !important"); 

【问题讨论】:

标签: jquery angularjs css


【解决方案1】:

我们可以创建一个类说

.marginleft100px {
     margin-left: 100px !important;
}

我们可以使用 addClass() 添加这个类;而是使用 .css()。

希望这会奏效。

【讨论】:

  • 解决方法请参考此stackoverflow.com/questions/2655925/…
  • 我们需要使用.animate()
  • 在 animate 中只有三个属性,例如 div.animate({height: 300}, "slow");
  • 希望你提到了这个link。试试这些,然后告诉我。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-04-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-07
  • 1970-01-01
  • 1970-01-01
  • 2019-02-28
相关资源
最近更新 更多