gpt4 book ai didi

html - Firefox:删除表格单元格周围的线

转载 作者:太空宇宙 更新时间:2023-11-04 02:29:59 24 4
gpt4 key购买 nike

我有一个简单的表格,允许用户使用 ctrl 键进行一些交互。

一切正常,但在 FF 上,当用户按住 ctrl 键并单击单元格 (<td>) 时,会添加一条蓝线:

enter image description here

我尝试使用 outline: 0; 删除它但没有成功。

scss:

table {
border-top: 1px solid #cfcfcf;
th {
min-width: 150px;
cursor: pointer;
}
th,
td {
border: 1px solid #cfcfcf;
vertical-align: middle;
outline: 0;
}
}

最佳答案

请试试这个:

table { -moz-user-select: none; }

如果上面的方法不起作用,那么试试这个:

$('table').on('mousedown', function(e) { 如果 (e.ctrlKey) { e.preventDefault(); } });

关于html - Firefox:删除表格单元格周围的线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36689208/

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