html - 删除输入类型图像按钮的边框?

标签 html css

这是我目前的代码:

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/

相关文章:

"height:50px"和 "height:auto"之间的 CSS 转换

javascript - 如何在 window.location 之前显示 msg 2 秒

html - 如何检测我的浏览器是否为 Firefox?

javascript - 加载指令时调用 init 函数

javascript - 使用 Angularjs 为段落动态创建按钮

css - 使用 CSS3 媒体查询在 Samrty 中包含一个文件

css - 打印时确保 CSS 精确大小

java - 带有包含 URL 的字符串参数的 RequestMapping

javascript - 单击某个选项,然后将值传递给链接到唯一 url 的 "buy now"按钮

CSS - 盒子阴影技巧?