多个单元格上的文本溢出:如何使用悬停等忽略文本..?(Text

编程入门 行业动态 更新时间:2024-10-28 13:23:19
多个单元格上的文本溢出:如何使用悬停等忽略文本..?(Text-Overflow over multiple cells: Howto ignore text with Hover etc..?)

我有一个表(参见附件),文本可能溢出一些单元格。 在我的例子中,“11:00-13:30”是第一个粉红色单元格的文本,样式为“溢出:可见”。 这是故意的。 到目前为止一切都那么好,但现在我的文本触发悬停并始终为第一个单元格点击:假设你将鼠标移动到“13:30”我需要为底层=第二个单元格触发悬停。

有没有办法将文本“忽略”为一个元素,并传递所有事件并悬停到下一个元素(=单元格)?

I have a Table (see sample attached), where a text may overflow over some cells. "11:00 - 13:30 " in my example is the text of the first pink cell, with style "overflow: visible". That is on purpose. So far so good, but now my text triggers hover and clicks always for the first cell: Say you move your mouse over "13:30" I need hover triggered for the underlying = second cell.

Is there a way to kind of "ignore" the text as an element, and pass all events & hover to the next element (= cells) ?

最满意答案

如果单击事件在单元格上,则可以解除css中文本的鼠标事件,e。:

.cell p { pointer-events: none;}

If the click event is on the cell, you can unbind the mouse events of the text from css, e.:

.cell p { pointer-events: none;}

更多推荐

本文发布于:2023-07-26 03:58:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1270763.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本   多个   如何使用   单元格   Text

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!