由於我是初學者,所以我非常努力。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',所以我可以看到更多的東西放置在頁面上? –