带有图像背景的提交按钮-CSS
我不明白为什么我的CSS不能与我的提交按钮一起工作。我错过什么了吗带有图像背景的提交按钮-CSS,css,image,background,submit,Css,Image,Background,Submit,我不明白为什么我的CSS不能与我的提交按钮一起工作。我错过什么了吗 .searchREG { width: 184px; height:175px; float:left; background: url('/admin/img/search.png') no-repeat; } .searchREG:hover { background-position: 0 -175px no-repeat; cursor:pointer } <
.searchREG {
width: 184px;
height:175px;
float:left;
background: url('/admin/img/search.png') no-repeat;
}
.searchREG:hover {
background-position: 0 -175px no-repeat;
cursor:pointer
}
<input class="searchREG" type="submit" value="submit">
.searchREG{
宽度:184px;
高度:175px;
浮动:左;
背景:url('/admin/img/search.png')不重复;
}
.searchREG:悬停{
背景位置:0-175px无重复;
光标:指针
}
您应该查看图像的url是否有问题。(到底什么不起作用?)
尝试删除图像url中的第一个斜杠。(曾经遇到过)
什么不起作用?它可以在jsfiddle()中显示吗?帮助你会容易得多
background: url('admin/img/search.png') no-repeat;