html - 占位符在 Chrome 中看起来很奇怪,如何解决

标签 html css

如下图所示,在 Chrome 浏览器中,Placeholder 无法正常工作...它正在向左侧滑动。

我该如何解决这个问题。

我没有为占位符使用任何 CSS

代码就像

<input type="text" name="users_address" placeholder="Address" required="">

enter image description here

最佳答案

不知道为什么会这样,你可以在你的css中添加这段代码

input::placeholder,
input::-webkit-input-placeholder,
input::-moz-placeholder,
input::-ms-input-placeholder {
  text-indent:10px;
}

关于html - 占位符在 Chrome 中看起来很奇怪,如何解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45610107/

相关文章:

html - 如何使用 flexbox 将一个 div 放在另一个 div 的末尾?

html - 如何使用 CSS 创建倾斜背景?

javascript - 如何在同一行上获得多个具有不同 ID 的进度条?

css - 在一行 HTML 中布局 3 个图像链接

javascript - 短信链接不适用于 Android 上的环聊

javascript - html悬停不同的div

javascript - 如何在 Material-UI 中更改选项卡组件的大小?

css - Bootstrap 3 和选项卡 : How set custom color for more than one active tab?

html - float 属性是否会影响复选框的功能?

html - 为什么我的图例不尊重父字段集的填充?