我想更改元素的bottom属性 我希望它在底部增加和减少时有不同的延迟,但如果我设置:
transition-property: bottom;
transition-delay: 0.3s;
-moz-transition-delay: 0.3s;
-webkit-transition-delay: 0.3s;
js代码:
set_bottom = function(control_bar_height){
if(is_user_active){
document.getElementById("video-link").style.bottom = control_bar_height + 30 + 'px';
}else{
document.getElementById("video-link").style.bottom = 30 + 'px';
}
};
this.on("useractive", function () {
is_user_active = true;
set_bottom(this.controlBar.height());
});
它将底部增加和减少延迟设置为0.3s 我怎么能这样做?