【 H5EDU问答】请问下为什么input和span标签放一起后不能同高?
html5吧
全部回复
仅看楼主
level 11
shadow♬ 楼主
2017年07月07日 03点07分 1
level 11
shadow♬ 楼主
这是我的代码,为什么右边的span会高一点点?
<style type="text/css">
*{margin: 0;padding: 0;}
.search input {
margin-top: 35px;
margin-left: 125px;
border: 2px solid rgb(42, 115, 253);
border-right: none;
width: 450px;
height: 30px;
}
.search span {
width: 65px;
height: 30px;
background-color: rgb(42, 115, 253);
display: inline-block;
text-align: center;
color: white;
font-size: 20px;
border: 2px solid rgb(42, 115, 253);
-webkit-user-select: none;
line-height: 30px;
}
</style>
<div class="search">
<input id="search_input" type="text" /><span>Go</span>
</div>
2017年07月07日 03点07分 2
level 11
shadow♬ 楼主
为什么右边的会高出几px出来。。?
2017年07月07日 06点07分 3
level 4
input是这样子的,原因不知道…… 你可以试下声明版本,很多问题都是没声明的锅
2017年07月11日 14点07分 4
有声明版本的,Html5。原来这样啊,我还以为是我代码有问题
2017年07月13日 09点07分
1