HTML5 中 button 的位置异常问题
本帖最后由 hhhljy 于 2022-5-24 23:02 编辑是b站pink老师课上的案例,页面在百分之八十的缩放时显示没有问题,其它的缩放比例会出错,很奇怪
就是搜索按钮会出现白色的缝隙
完整的代码在附件中
相关代码:
<!-- search模块 -->
<div class="search">
<input type="search" placeholder="语言开发">
<button>搜索</button>
</div>
.search{
position: absolute;
left: 346px;
top: 25px;
width: 538px;
height: 36px;
border: 2px solid #b1191a;
}
.search input {
float: left;
/*加浮动去除input与button之间的缝隙*/
width: 454px;
height: 32px;
padding-left: 10px;
}
.search button {
float: right;
width: 80px;
height: 33px;
margin-top: -1px;
background-color: #b1191a;
}
* {
margin:0;
padding: 0;
box-sizing: border-box;
}
button,
input {
border: 0;
outline: none;
} 66666666666666 {:10_256:} 学习到了 66666666666666学习了 {:10_298:} {:5_109:} {:10_256:}{:10_256:}{:10_256:} {:10_256:}{:10_256:}{:10_256:} {:5_109:} {:5_92:} {:10_243:} 浏览器名及版本? {:10_245:}
页:
[1]