Jquery 设置动画到顶部
js- css- 我想做的是,较小的长方体与大长方体内部的底部对齐,动画发生在上方向,但底部和边距底部没有任何帮助。 这里是链接- 试试这个Jquery 设置动画到顶部,jquery,html,css,Jquery,Html,Css,js- css- 我想做的是,较小的长方体与大长方体内部的底部对齐,动画发生在上方向,但底部和边距底部没有任何帮助。 这里是链接- 试试这个 .inner { height:100px; width:400px; background-color:#333; margin-bottom:0px; } .outer { height:400px; width:400px; background-color:#999; } 试试这个 .in
.inner {
height:100px;
width:400px;
background-color:#333;
margin-bottom:0px;
}
.outer {
height:400px;
width:400px;
background-color:#999;
}
试试这个
.inner {
height:100px;
width:400px;
background-color:#333;
margin-bottom:0px;
}
.outer {
height:400px;
width:400px;
background-color:#999;
}
定位您的元素:
.inner {
height:100px;
width:400px;
background-color:#333;
margin-bottom:0px;
bottom:0;
position:absolute;
}
.outer {
height:400px;
width:400px;
background-color:#999;
position:relative;
}
奖金 您可以使用纯CSS实现这一点:
.inner {
height:100px;
width:400px;
background-color:#333;
position: absolute;
bottom: 0;
left: 0;
}
.outer {
height:400px;
width:400px;
background-color:#999;
position: relative;
}
- 神奇之处在于:悬停伪类和转换属性
- 检查一下
- 神奇之处在于:悬停伪类和转换属性
- 检查一下
-
定位您的元素:
.inner {
height:100px;
width:400px;
background-color:#333;
margin-bottom:0px;
bottom:0;
position:absolute;
}
.outer {
height:400px;
width:400px;
background-color:#999;
position:relative;
}
奖金 您可以使用纯CSS实现这一点:
.inner {
height:100px;
width:400px;
background-color:#333;
position: absolute;
bottom: 0;
left: 0;
}
.outer {
height:400px;
width:400px;
background-color:#999;
position: relative;
}