我有一个表(参见附件),文本可能溢出一些单元格。 在我的例子中,“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;}更多推荐
发布评论