输入字段文本,仅在IOS上更改样式

时间:2017-03-14 14:02:52

标签: html ios css mobile input

我有一个问题,输入字段中的文本看起来像这样,但只在IOS上。当我开始在现场打字时,一切都很好..

recent versions of our SDK

它看起来很好,在Android和桌面上,只有ios似乎会引起问题。

任何解决此问题的提示都将不胜感激。

代码:

HTML:

<div class="search-overlay">
        <div class="search-input" role="search">
            <input placeholder="Søg på titel" name="query" data-quick-search="" id="search-programs-input"
                type="text" class="" value="" autocomplete="off"><button type="submit" class="dr-icon-search search-input-icon form-control-feedback"><span class="sr-only">{{dictionary "search" "Title"}}</span></button>
            <button type="button" class="close close-search" data-quicksearch-close=""><span class="dr-icon-close" aria-hidden="true"></span><span class="sr-only">{{dictionary "mainNavigation" "closeSearch"}}</span></button>

        </div>
    </div>

造型:

.search-overlay {
    background-color: white;
    height: 75px;
    position: absolute;
    top: -75px;
    width: 500px;
    right: 5px;
    z-index: 900;
    border: 1px solid #ccc;
    .search-input {
        padding: 15px;
        padding-left: 20px;
        input {
            background: #E5E5E5;
            width: 92%;
            font-size: 24px;
        }
        button {
            border: none;
            background: transparent;
            &[class*=dr-icon-search] {
                position: absolute;
                right: 55px;
                top: 23px;
                &:before {
                    font-size: 25px;
                    color: gray;
                }
            }
            .dr-icon-close {
                position: absolute;
                right: 14px;
                top: 23px;
                &:before {
                    font-size: 15px;
                    color: gray;
                }
            }
        }
    }

}

1 个答案:

答案 0 :(得分:0)

在我的输入中添加Line-height:24px;修复了问题......