html
1<div class="box"> 2 <div class="cap"> 3 </div> 4</div>
css
1box { 2 position: relative; 3} 4cap { 5 position: absolute; 6 top: 100%; 7 transition: .3s; 8} 9box:hover cap { 10 bottom: 0; 11}
以上のようなコードで
ボックスにカーソルが乗ると高さは一定ではないキャプションを下からスライドして表示させたいのですが上手く行きません。
どのようにしたらいいでしょうか。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/02/10 08:18