【问题标题】:Is there a way to style the password discs in an input?有没有办法在输入中设置密码光盘的样式?
【发布时间】:2021-06-27 00:26:06
【问题描述】:

在 HTML/CSS 中,有没有办法更改密码输入的颜色/大小?

【问题讨论】:

  • 我认为这是不可能的,因为这种事情通常由浏览器管理。你最好的选择可能是使用某种 js 库。没有做过任何研究,所以我不确定。

标签: html css input passwords


【解决方案1】:

你可以试试:

<input style="color:red;width:100px;height:50px;"type="password" value="1234567890">

如果你想让密码输入更花哨:

input,
.filter-blur {
  width: 100%;
  padding: 5px 10px;
  border: 3px solid #ddd;
  border-radius: 4px;
  font-size: 17px;
}

input:focus,
.filter-blur-focused {
  outline: 0;
  border-color: rgb(94, 158, 214);
}

.filter-blur input {
  border: 0;
  padding: 0;
  margin: 0;
  -webkit-filter: blur(3px);
}
<div class="filter-blur"><input value="password123" /></div>

【讨论】:

    猜你喜欢
    • 2016-02-12
    • 1970-01-01
    • 2019-03-23
    • 1970-01-01
    • 1970-01-01
    • 2018-08-17
    • 1970-01-01
    • 2021-05-18
    相关资源
    最近更新 更多