简体   繁体   中英

Onlick on SVG icon can be path or svg, how to make only SVG?

I have SVG icon that fire event if clicked. Problem is that onClick event target can be not only SVG, but path, if i click on path inside svg. Is there a way to make path and svg as whole?

Oh, it's was simplier that i thought. You can just add pointer-events: 'none' to every path inside svg.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM