Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

115
Visualizações
How to show only one password bullet in an input field?

Here is a simple input field

<input type="password">

During data input, each character is displayed in bullets (# of characters = # of bullets).

// "password" = ********

How can I only display ONE bullet despite typing more characters? By using clean JS or/and CSS.

// "password" = *
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You could just add a padding at the end of your input element to hide all but one *:

input {
  width: 50px;
  padding-right: 40px;
  box-sizing: border-box;
}
<input type="password" value="Correct horse battery staple" />

Why you would do this is beyond me, but it works.

Actually, running this immediately shows me the first problem with this idea: My password manager's button on the input field is large enough to completely cover that first character.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda