由于我是初学者,所以我非常努力。CSS过渡:悬停到显示div
你能告诉我在悬停时如何过渡.box
的position
?
我只能显示它,但我不能transition
的position
从bottom
到top
这是我想做的事情。
.more {
position: relative;
height: 100px;
}
.box {
display: none;
position: absolute;
background: white;
border-radius: 4px;
height: 43px;
width: 169px;
top: 50px;
transition: top 5s;
}
.more:hover .box {
top: 100px;
display: block;
}
<div class="col-sm-1 more">
<a href="#" class="paragraphs " id="xx">More</a>
<div class="box">
<span>Pages</span>
</div>
</div>
“top”是什么意思? –
好吧,我给了位置相对如此使用属性顶部我认为应该做的改变位置,但我不知道 –
你可以添加更多的'HTML',所以我可以看到更多的东西放置在页面上? –