I update my chrome browser to 83
and saw the option tag
and it looks ugly, It shows the black border when hovering in option.
I tried
option {
box-shadow: none;
border: none;
-webkit-appearance: none;
}
option:hover {
box-shadow: none;
border: none;
-webkit-appearance: none;
}
option {
box-shadow: none;
border: none;
-webkit-appearance: none;
}
option:hover {
box-shadow: none;
border: none;
-webkit-appearance: none;
}
<select>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
</select>
but still no luck!! why? I don't know.
I want to remove that black border because In my project it looks ugly.
MY NEED
I need same result as previous select and option tag have.
settings in chrome > Appearance > Show a quick highlight on the focused object. Disable this option.
To remove the CSS hover effect from a specific element, you can set the pointer-events property of the element (the hover behavior of which you want to disable) to “none”.
Answer: Use CSS outline property In Google Chrome browser form controls like <input> , <textarea> and <select> highlighted with blue outline around them on focus. This is the default behavior of chrome, however if you don't like it you can easily remove this by setting their outline property to none .
Chromium team has updated form controls look-n-feel to bring touch support and consistency among all form controls. That's why whenever a user clicks inside text field or clicks on drop-down boxes, buttons, etc, a black border is displayed to highlight the focus.
in Chrome 84, the black border around select option item doesn't seem to appear when hovering. Now changing css outline rule is the easiest way to remove black border for focusable input.
*:focus {
outline: none;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With