Answer the question
In order to leave comments, you need to log in
Is there an alternative to input type="number" to show a number pad on a smartphone?
The fact is that browsers begin to process input in a field with type = "number" in a special way. And if special browser styles can somehow be disabled:
/* Удаляем стрекли для ячеек с type number в Chrome. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Удаляем стрекли для ячеек с type number в Firefox. */
input[type="number"] {
-moz-appearance: textfield;
}
/* Удаляем красную рамку для ячеек с type number в Firefox. */
input:invalid {
box-shadow: none;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question