输入位置不'无法在Iphone上正常显示

Input position doesn't display properly on Iphone

本文关键字:常显示 显示 Iphone 位置 输入      更新时间:2024-06-28

我被输入表单卡住了。当我在开发者控制台中检查它时,一切都很好。但当我从iphone中检查时,它的位置大约变为1-2px。我从相同尺寸的安卓手机上检查了一下,一切都很好。在开发控制台的Iphone 5上输入-http://cs629525.vk.me/v629525181/40c5e/zrdadYwKeBU.jpg。从我的iphone 5s输入-http://cs629525.vk.me/v629525181/40c57/KjsRhwnjQ4k.jpg。下方的代码

<form id="subscribe">
            <input type="text" class="enter-email" name="subscribe-email" id="subscribe-email" placeholder="YOUR EMAIL" spellcheck="false" />
            <button type="submit" id="signup-button" class="signup-button c-form">NOTIFY ME</button>
            <label for="subscribe-email" class="subscribe-message c-form"></label>
        </form>
<!--css-->
.enter-email {
margin-top: 30px;
margin-left: 17.5%;
width: 40%;
font-size: 16px;
height: 50px;
background: none;
border: 2px solid white;
color: #fff;
text-align: center;
outline: none;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;}
.signup-button {
height: 50px;
border: 2px solid white;
color: white;
text-align: center;
padding: 5px;
font-size: 16px;
width: 25%;
background: #32dbd0;
margin-left: -6px;
transition: all 0.4s ease;}
::-webkit-input-placeholder {
color: #fff;
font-size: 16px;
text-align: center;
padding: 1px; }

将以下内容添加到您的两个元素中:

.enter-email {
    vertical-align: top;
    ...
}
.signup-button {
    vertical-align: top;
    ...
}

默认情况下,按钮和输入是内联块。这将迫使他们在同一水平上保持一致。