【问题标题】:Center cursor in form field [duplicate]表单字段中的中心光标[重复]
【发布时间】:2018-07-19 10:33:28
【问题描述】:

我正在寻找一种将光标和输入到表单字段中的文本居中的方法,就像 WIRED 主页上的搜索字段:https://www.wired.com/

Wired's search form

已经感谢您的帮助

【问题讨论】:

标签: html forms css webforms


【解决方案1】:

text-align:center; 添加到输入的 CSS 规则中。 这与在网页上居中文本的作用相同。

input[type="text"] { text-align:center; }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-05-23
    • 2020-08-24
    • 2021-03-04
    • 1970-01-01
    • 1970-01-01
    • 2013-04-19
    • 2021-02-10
    • 1970-01-01
    相关资源
    最近更新 更多