【发布时间】:2017-05-21 05:34:22
【问题描述】:
我有一个从 height:0, width:0 到某个宽度的过渡。它工作正常,从左下角到右上角。现在我想如果我将浮动更改为“右”,则转换将从右下角到左上角。有什么方法可以进行这种过渡吗?
css:
.ablauftext{
height:0;
width:0;
position:absolute;
overflow:hidden;
background-color:white;
transition: all 1s ease;
-webkit-transition: all 1s ease;
bottom:90px;
}
.active{
height:400px;
width:400px;
}
javascript:
$('#planung').click(function(){
if(!$current.is('#planungtext')){
$($current).removeClass('active');
setTimeout(function(){$('#planungtext').addClass('active')}, 1000);
$current = $('#planungtext');
}
});
我的元素上只有浮点数的 ID,所以我认为我不必在此处添加此 CSS。
【问题讨论】:
标签: css transition