Remove the arrow that appears for input type=“time

2019-02-19 21:58发布

问题:

I am using the default HTML5 sample line of code: I have used a custom background. I want to remove the black arrow that appears on the right.

The image shows a black arrow that appears. Need it remove it. I tried many css tricks but didn't work.

Sample code

回答1:

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0; 
}

or

/* Hide the cancel button */
::-webkit-search-cancel-button { 
    -webkit-appearance: none; 
}

/* Hide the magnifying glass */
::-webkit-search-results-button {
     -webkit-appearance: none; 
}

/* Remove the rounded corners */
input[type=search] { 
    -webkit-appearance: none; 
}