有没有办法在md-sidenav中配置show-hide速度?

时间:2016-12-06 14:30:14

标签: css angular-material

我使用角度材料,md-sidenav:

<md-sidenav   md-component-id="left" md-whiteframe="4" md-disable-backdrop>
    <md-content  ng-include="'app/components/work/iteration-config/iteration-config.tmpl.html'"></md-content>
</md-sidenav>

但是sidenav会快速移动。有没有办法配置它的显示/隐藏速度?

1 个答案:

答案 0 :(得分:0)

您必须覆盖设置动画的样式。挖掘我发现的代码就是这两个:

md-sidenav.md-closed-add, md-sidenav.md-closed-remove {
    -webkit-transition: all .2s ease-in;
    transition: all .2s ease-in
}
md-sidenav.md-closed-add.md-closed-add-active,
md-sidenav.md-closed-remove.md-closed-remove-active {
    -webkit-transition: all .4s cubic-bezier(.25, .8, .25, 1);
    transition: all .4s cubic-bezier(.25, .8, .25, 1)
}

在导入angular.css.min文件后将它们声明为某个地方并将时间(.2s和.4s)更改为您想要的任何内容,就是这样!