我的文本输入看起来像这样:
这是我的 CSS::
.searchBox input[type=text]{
left: 10px;
display: block;
position: absolute;
height: 18px;
padding: 7px 0 8px;
width: 280px;
color: #828483;
}
我不知道哪个 CSS 属性可以解决这个问题。
你能帮帮我吗?
最佳答案
使用行高
:
input {
height: 2em;
line-height: 2em; /* equal to the height to vertically-centre the text */
/* other CSS */
}
关于html - 文本输入光标太高。我该怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9605850/