加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

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

发布时间:2020-12-14 18:34:49 所属栏目:资源 来源:网络整理
导读:我想知道是否可以将占位符和用户将在文本字段中输入的输入居中.我想有可能我无法弄明白.有人可以帮忙吗?我的问题文本字段的代码如下…… input type="text" style="font-weight:bold:" name="kword" id="kword" autofocus ="on" placeholder="Enter Keyword
我想知道是否可以将占位符和用户将在文本字段中输入的输入居中.我想有可能我无法弄明白.有人可以帮忙吗?我的问题文本字段的代码如下……
<input type="text" style="font-weight:bold:" name="kword" id="kword" autofocus ="on" placeholder="Enter Keyword(s)" autocomplete ="on"/>

谢谢

解决方法

这可以用于文本对齐:中心

CSS:

input,input[placeholder] {
    text-align: center;
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读