【发布时间】:2015-08-25 17:14:44
【问题描述】:
我在右侧有一个搜索栏和一个按钮,在一个名为 homesearchcontent 的 div 内。问题是在 IOS 触摸设备上,搜索栏比按钮高。
代码如下:
HTML:
<form action='./results.php' method='post' class="homesearchcontent">
<input type='text' name='input' id="searchdevice" class="search-field" placeholder="" />
<input type='image' src='img/search6.png' class="search-button">
</form>
CSS:
.homesearchcontent {
position: relative;
padding-left: 2px;
width: 100%;
text-align: center;
margin-left: auto;
margin-right: auto;
padding-bottom: 50px;
}
.search-field {
-webkit-border-radius: 3;
-moz-border-radius: 3;
border-radius: 3px;
border: solid #191919 1px;
padding-right: 1%;
padding-left: 1%;
width: 70%;
height: 40px;
vertical-align: top;
font-size: 1.8em;
font-family: Arial, sans-serif;
text-decoration: none;
}
.search-button {
outline: none;
vertical-align: top;
width: 36px;
height: 36px;
clear: both;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background: #ffffff;
padding: 2px 7px 2px 7px;
border: solid #191919 1px;
text-decoration: none;
}
谁能帮帮我?
【问题讨论】:
-
问题存在于所有移动设备上还是仅在iOS上?
-
仅在 IOS TOUCH 设备上。在 Mac 和其他非 IOS 触控设备上它可以工作。
-
你没有关闭第二个输入,我认为这是问题 你需要关闭它 />
-
感谢您注意这一点。不幸的是,它并没有解决问题。