【发布时间】:2021-08-11 03:12:24
【问题描述】:
我想将高度增长路径从自上而下更改为自下而上。在 CSS 中可以吗?
.button {
margin-top:200px;
margin-right:34px;
width:150px;
height:45px;
background:black;
float:right;
transition-duration:2s;
}
.buttom:hover{
height:180px;
transition-duration:2s;
}
<div class='button'> </div>
【问题讨论】:
-
我能想到的唯一方法是使用绝对定位,原始位置基于
bottom而不是top。正如你所做的那样使用浮动的相对定位......我不这么认为。