私のウェブサイトでは、テキスト入力のプレースホルダはテキスト入力内に配置されています。他のすべてのブラウザでは、ブラウザは垂直方向に中央に配置されています。 Firefoxのの入力プレースホルダがFirefoxで垂直方向に配置されていません
画像:まったく同じコードで
In this jsfiddle that I made、それが縦にFirefoxでセンタリングされます。
jsfiddleのトップにないときに、私のウェブサイトのFirefoxの入力の上部に何があるのでしょうか?
コード:
HTML:
<div id="search-button">
<input id="search-input" placeholder="SEARCH KEY WORD"></input>
<div id="search-icon"></div>
</div>
CSS:
#search-button,
#search-icon {
font: 200 14px 'Helvetica Neue' , Helvetica , Arial , sans-serif;
border-radius: 6px;
height: 64px;
text-decoration: none;
color: #fff;
float: right;
margin-bottom: 20px;
line-height: 64px;
}
#search-button {
position: relative;
width: 100%;
border: 1px solid #00bfff;
}
input,
textarea,
button {
outline: none;
}
#search-input {
position: absolute;
height: 100%;
left: 20px;
right: 20px;
font-size: 14px;
text-transform: uppercase;
line-height: 100%;
width: calc(100% - 80px);
display: inline-block;
border: 0;
color: #00bfff;
}
#search-icon {
width: 64px;
height: 64px;
position: absolute;
top: 0;
right: 0;
background: url("../../assets/images/home_page/search-blue.svg") center no-repeat;
background-size: 40%;
}
残念ながら、これはSafariでそれを混乱させます。どちらのケースもChromeがうまく処理します。 –