相关疑难解决方法(0)

中心HTML输入文本字段占位符

如何以html格式将输入字段的占位符对齐居中?

我使用以下代码,但它不起作用:

CSS - >

input.placeholder {
    text-align: center;
}
.emailField {
    top:413px;
    right:290px;
    width: 355px;
    height: 30px;
    position: absolute;
    border: none;
    font-size: 17;
    text-align: center;
}
Run Code Online (Sandbox Code Playgroud)

HTML - >

<form action="" method="POST">
    <input type="text" class="emailField" placeholder="support@socialpic.org" style="text-align: center" name="email" />
    <!<input type="submit" value="submit" />  
</form>
Run Code Online (Sandbox Code Playgroud)

html css

144
推荐指数
7
解决办法
26万
查看次数

标签 统计

css ×1

html ×1