gpt4 book ai didi

css - 删除焦点下拉菜单的虚线边框/轮廓

转载 作者:技术小花猫 更新时间:2023-10-29 10:18:42 26 4
gpt4 key购买 nike

如何删除从下拉菜单中选择元素时显示的虚线边框/轮廓?

enter image description here

您可以看到显示了虚线边框/轮廓,我想删除它(在 Firefox 中截取的屏幕截图)。

尝试下面的解决方案并没有删除它:

select:focus, option:focus, select::-moz-focus-inner, option::-moz-focus-inner {
outline: none;
border: none;
}

HTML 就是这样:

<select name="order">
<option value="desc">Newest to oldest</option>
<option value="asc">Oldest to newest</option>
</select>

最佳答案

将以下内容添加到您的样式表中。 -

select:-moz-focusring { color: transparent;
text-shadow: 0 0 0 #000; }

一直对我有用,希望对你有帮助!

关于css - 删除焦点下拉菜单的虚线边框/轮廓,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9119629/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com