Computer >> Computer tutorials >  >> Programming >> CSS

How to remove arrows/spinners from input type number with CSS?


Following is the code to remove arrows/spinners from input type using CSS −

Example

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
   -webkit-appearance: none;
   margin: 0;
}
input[type="number"] {
   -moz-appearance: textfield;
}
</style>
</head>
<body>
<h1>Input Numbers Hide Arrows</h1>
<input type="number" value="10">
<h2>Only numbers can be entered in the above field</h2>
</body>
</html>

Output

his will produce the following output −

How to remove arrows/spinners from input type number with CSS?