gpt4 book ai didi

HTML 输入文本光标位置问题

转载 作者:太空宇宙 更新时间:2023-11-04 09:09:25 26 4
gpt4 key购买 nike

只是想请求你的帮助。加载 html 页面时,输入文本上的光标太高或位置错误:

enter image description here

但是当聚焦时,输入文本光标是正确的:

enter image description here

在这里发现了另一个相同的问题,但是 line-height 修复没有解决我的问题。

CSS:

input[type=text] {
border-radius: 0 !important;
height: 50px !important;
font-size: 14px !important;
box-shadow: none !important;
line-height: 100% !important;
}

最佳答案

这是填充问题。当你点击 input fiend 时,它会被聚焦,然后它会得到一个填充,这样光标就在正确的位置。所以像下面这样设置填充 -

input[type=text] {
border-radius: 0 !important;
height: 50px !important;
font-size: 14px !important;
box-shadow: none !important;
line-height: 100% !important;
padding: adjust according to your choice;
}

关于HTML 输入文本光标位置问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42217768/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com