A
A
Anton Schultz2020-04-14 12:28:03
css
Anton Schultz, 2020-04-14 12:28:03

How to change placeholder property when text input is clicked?

There is such a property in the input, is it possible to somehow change it via css when clicking on the input?
For example, remove the text, otherwise until you start writing, this text remains by default.

<form>
  <input type="text" placeholder="введите текст">
</form>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tigran Abrahamyan, 2020-04-14
@MrAnderson1999

input:focus::placeholder {
  color: transparent;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question