HTML | CSS:输入按钮之间的空格 [英] HTML|CSS: Space between input buttons
本文介绍了HTML | CSS:输入按钮之间的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题,我在这两个按钮之间有一个空格,如下图所示:
I have a problem in which I have a space between these two buttons as seen in the image below:
代码如下:
<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;
}
如何删除该空格?
浏览器:
Firefox 3.5
Browser: Firefox 3.5
IE8
推荐答案
两个< input>
之间的换行符在页面上在它们之间创建一个空格。您必须删除换行符,或使用此技巧:
The line feed between the two <input>
s creates a space between them on the page. You have to remove the line feed, or use this trick :
<input id="NeedBtn" class="PostBtn" type="button" /><!--
--><input id="ProvBtn" class="PostBtn" type="button" />
这篇关于HTML | CSS:输入按钮之间的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文