JsFiddle 问题出在占位符上,当我调高字体大小时它看起来不对,检查 jsfiddle,文本看起来分成两半。
<input type="text" id="txtSearch" placeholder="Search" />
#txtSearch {
width:1050px;
height:35px;
background-color:#605784;
border-width:0px;
}
::-webkit-input-placeholder {
color: White;
font-family:'Open Sans', sans-serif;
font-size:15pt;
position:relative;
top:-5px;
}
最佳答案
checkout this solution from stackoverflow 输入及其占位符必须具有匹配的字体样式
input,
::-webkit-input-placeholder {
color: White;
font-family:'Open Sans', sans-serif;
font-size:15pt;
position:relative;
top:-5px;
}
关于css - 当我更改文本框中占位符的大小时,它看起来不对,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29735082/