Bootstrap

SVG pointer-events属性

pointer-events


The pointer-events attribute allows authors to control whether or when an element may be the target of a mouse event. This attribute is used to specify under which circumstance (if any) a mouse event should go "through" an element and target whatever is "underneath" that element instead.


pointer-events属性允许作者控制一个元素是否是鼠标事件的目标。这个属性用于指定在哪些情况下鼠标事件(如果有的话)应该“通过”一个元素,目标是“下面”元素(一个元素覆盖到下一个元素上)。


<pre name="code" class="javascript">DragTarget.setAttributeNS(null, "pointer-events", "none"); 
//表示下面的元素不再接收鼠标事件
 




;