我有一个问题,我在这两个按钮之间有一个空格。
代码如下:
<input id="NeedBtn" class="PostBtn" type="button" />
<input id="ProvBtn" class="PostBtn" type="button" />
.PostBtn
{
background: url(../Images/Buttons/PostButtonF.png) no-repeat;
width: 50px;
height: 28px;
border: none;
margin: 0;
padding: 0;
}
#NeedBtn
{
background-position: 0 0;
}
#ProvBtn
{
background-position: -50px 0;
}
如何删除该空格?
浏览器: 火狐 3.5
IE8
最佳答案
两者之间的换行<input>
s 在页面上的它们之间创建一个空格。你必须删除换行符,或者使用这个技巧:
<input id="NeedBtn" class="PostBtn" type="button" /><!--
--><input id="ProvBtn" class="PostBtn" type="button" />
关于HTML|CSS : Space between input buttons,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2095886/