这是我目前的代码:
HTML:
<!DOCTYPE html>
...
<form>
<input type="image" value=" " class="btnimage" />
</form>
...
CSS:
.btnimage {
width: 80px;
height: 25px;
background:url('C:/Users/John/Desktop/Misc Things for the CoD Ghosts Site/SubmitButton.png');
}
.btnimage:hover {
background-position: 0 -25px;
background:url('C:/Users/John/Desktop/Misc Things for the CoD Ghosts Site/SubmitButtononHover.png');
}
上面的代码有效,但是按钮周围有一个边框,我想去掉它。到目前为止,我已经尝试将 background-border:0;
添加到两个类中,但没有成功。
最佳答案
尝试
input {
/* sets border width to 0 and border style to none */
border:0 none;
}
或
input {
border: 0px solid black;
}
关于html - 删除输入类型图像按钮的边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21058017/