0
我可以知道如何更改圖像以及文字內部圖像的位置嗎?當我將圖片懸停下來,但不是文字。圖像正常工作,但不是文字。onhover將圖像和文字位置向下和向上移動到初始位置?
小提琴:
h2 {
position:fixed;
margin-top:40px;
left: 50;
z-index:100;
height:100%;
}
h2:hover{
position: relative;
margin-top:-50px;
left: 50;
}
https://jsfiddle.net/mjLLgce7/1/
請幫助我。由於
檢查jsfidle here https://jsfiddle.net/mjLLgce7/1/ –
如果我理解正確,試試這個:a:hover h2 {margin-top:50px} – Hobroker
有ma你的腳本有問題。在某些鼠標位置上,圖像會自行上下移動。 –