Search
 
SCRIPT & CODE EXAMPLE
 

HTML

customize appearance of up/down arrows in html number inputs

<!DOCTYPE html>
<html>
<head>
<style>
input[type="number"] {
  height: 32px;
  border-radius: 4px;
  border: 1px solid #d8d8d8;
  position: relative;
  text-align: center;
  font-size: 20px;
  width: 80px;
  outline: none;
  background-image: url('data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20viewBox%3D%220%200%2050%2067%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22none%22%20stroke-width%3D%222%22%3E%3Cline%20x1%3D%221%22%20x2%3D%2250%22%20y1%3D%2233.5%22%20y2%3D%2233.5%22%20stroke%3D%22%23D8D8D8%22%2F%3E%3Cpolyline%20transform%3D%22translate(25%2020)%20rotate(45)%20translate(-25%20-20)%22%20points%3D%2219%2026%2019%2014%2032%2014%22%20stroke%3D%22%23000%22%2F%3E%3Cpolyline%20transform%3D%22translate(25%2045)%20rotate(225)%20translate(-25%20-45)%22%20points%3D%2219%2052%2019%2039%2032%2039%22%20stroke%3D%22%23000%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');
  background-position: center right;
  background-size: contain;
  background-repeat: no-repeat;
  caret-color: transparent;
}

input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  opacity: 1 !important;
  background: transparent !important;
  border-width: 0px;
  margin: 0;
  border-left: 1px solid #d8d8d8;
  height: 34px;
  width: 23px;
  cursor: pointer;
}
</style>
</head>
<body>
<center>
<h1>Css for number type input's arrows.</h1>
<br>
<input type="number" value="0">
</center>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: click button to go to sub pag on html 
Html :: MQ is not defined, 
Html :: html go to specific part of page 
Html :: limite file input to jpg 
Html :: how to append a variable to html 
Html :: Reformat a python table in a html file 
Html :: vue icon 
Html :: nice error page html 
Html :: how to use variables in html 
Html :: image from website in whatshapp with meta tag 
Html :: add ruby title html erb icon 
Html :: html checkboxfor is not visible 
Html :: twig markdown html 
Html :: html month set default 
Html :: html text color 
Html :: password setCustomValidity html5 
Html :: c# to html 
Html :: add accordion in bootstrap 
Html :: proper center grid 
Html :: simple website using html and css 
Html :: empty elements in html 
Html :: multiple styles on one line 
Html :: html number input with commas 
Html :: how to add site logo in wordpress 
Html :: html code convert in pdf 
Html :: html text next line 
Html :: tina4 form token example 
Html :: textarea adds unwanted spaces 
Html :: how to register script html 
Html :: how to put in text chess pieces in HTML 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =