這裏是media div
與on hover X
我有一個形象:鼠標懸停效果推圖像下來
這裏是當你點擊div和上傳照片的圖像。正如你所看到的,它很適合在盒子裏面。
最後這裏是一個div當我hover over
圖像看X
。
正如你所看到的圖像得到下推。 我的最終結果是不是有它懸停在圖像和不影響圖像的位置
這裏是我的CSS:
.x {
color:red;
#width:50px;
#height:50px;
display:none;
#left:50px;
}
.MediaPreview:hover > .x {
display:block;
}
.MediaPreview {
position: absolute;
width: 128px;
height: 72px;
background-color: #e0e0e0;
cursor: default;
}
這裏是我的HTML:
<div class="MediaPreview" style="left: 10px; bottom: 10px;">
<span>Image or video, required</span>
<div class="x">x</div>
</div>
做我的答案對你的問題嗎? – Fiido93