2013-12-16 73 views
0

我需要帮助才能在盘旋时创建图像更改。我正在使用这个图像作为一个按钮。这是我的代码:如何更改悬停按钮?

.button_home { 
    width: 110px; 
    height: 50px; 
    background-image: url(background1.png); 
} 
.button_home :hover { 
    background-image: url(background_ov1.png); 
} 

我的HTML是:

<form action="webpage.HTML"> 
<input type="image" class="button_home"> 
</form> 

任何帮助吗?

+3

取出空间之间'.button_home'和':hover' – 2013-12-16 00:18:11

+0

更改'.button_home:hover'到'.button_home:hover' –

回答

4

摆脱空间的前:hover

.button_home:hover {