2017-10-05 62 views
-1

我試圖將鼠標懸停在提交按鈕上時更改圖像。但我不知道哪裏錯了。 這是CSS。HTML,CSS - 提交,圖像

#Prihlaseni { 
    position: absolute; 
    cursor: pointer; 
    top: 408px; 
    left: 507px; 
    width: 30px; 
    height: 32px; 
    width: 105px; 
    border: 1px; 
    font-size: 0px; 
} 

#Prihlaseni:hover { 
    background-image: url(\Users\Tikus\Desktop\PrihlaseniHtv.png); 
} 
+1

谷歌'CSS懸停背景image',我想你會發現很多的是你要尋找的例子。 – theGleep

回答

0

我在jsfiddle中運行了你的例子,它的工作。

#Prihlaseni { 
    position: absolute; 
    cursor: pointer; 
    top: 408px; 
    left: 507px; 
    width: 30px; 
    height: 32px; 
    width: 105px; 
    border: 1px; 
    font-size: 0px; 
} 

#Prihlaseni:hover { 
    background-image: url(https://www.w3schools.com/css/img_fjords.jpg); 
} 

https://jsfiddle.net/csLnz5em/