将占位符居中并在文本字段中输入文本

use*_*306 7 html css

我想知道是否可以将占位符和用户将在文本字段中输入的输入居中.我想有可能我无法弄明白.有人可以帮忙吗?我的问题文本字段的代码如下......

<input type="text" style="font-weight:bold:" name="kword" id="kword" autofocus ="on" placeholder="Enter Keyword(s)" autocomplete ="on"/>
Run Code Online (Sandbox Code Playgroud)

谢谢

Roh*_*zad 5

这可以用来text-align:center

CSS:

input, input[placeholder] {
    text-align: center;
}
Run Code Online (Sandbox Code Playgroud)