首页 > 其他分享 >svg pointer-events="auto"

svg pointer-events="auto"

时间:2023-01-03 10:35:55浏览次数:39  
标签:svg 元素 和子 auto pointer events

svg   pointer-events="auto"

 

<svg width="640" height="480" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" pointer-events="none">
  
  <g  >
     <animate  attributeName="opacity"
from="0" to="1" dur="3s"  begin="click"
restart="always" repeatCount="3"></animate>
    
    <rect x="150" y="50" width="100" height="50"   pointer-events="auto">   
     <animate  attributeName="x"
from="0" to="222" dur="3s"  begin="click"
restart="always" repeatCount="3"></animate>
</rect> 
<rect x="150" y="180" width="100" height="50" >   
     <animate  attributeName="x"
from="0" to="222" dur="3s"  begin="click"
restart="always" repeatCount="3"></animate>
</rect> 

    

</g>
  
  


</svg>
</body>
</html>

pointer-events="auto" 用了这个 标签 所有父元素和子元素 都会触发事件了 

标签:svg,元素,和子,auto,pointer,events
From: https://www.cnblogs.com/newmiracle/p/17021293.html

相关文章

  • svg click
    <svgwidth="640"height="480"version="1.1"xmlns="http://www.w3.org/2000/svg"xmlns:xlink="http://www.w3.org/1999/xlink"><rectx="150"y="50"width="100"he......
  • iView Dropdown events 设置点击事件无效
    一、反例<Dropdownclass="m-btn-style"style="margin-left:10px"><Buttontype="primary">......
  • CF1774D Same Count One - two-pointers -
    题目链接:https://codeforces.com/contest/1774/problem/D题解:比较巧妙,官方题解说的比较详细了,不再赘述了这题的实现也比较巧妙,two-pointers的时候两个指针指向的是行,由......
  • Safari浏览器对SVG中的<foreignObject>标签支持不友好,渲染容易错位
    在svg中需要写一个markdown编辑器,需要用到<foreignObject>绘制来html,编辑器选择了simplemde。大致html部分结构如下,<markdown-editor>组件为定制封装好的simp......
  • perl SVG 作图之线图
    今天尝试用perl来画一个简单的图,根据数据我们这里画线图。使用的模块是SVG::TT::Graph,两年前更新过,相比perl模块动不动十几年没有新版本,这个模块算不错了,出图格式为SVG格......
  • FreeSWITCH学习笔记:EventSocket
    本文更新于2022-12-20,使用FreeSWITCH1.10.7。目录apiauthbgapiconnectdivert_eventseventexitfilterfilterdeletelingerlogmyeventsnixeventnoeventnolingernologsendev......
  • 指向分析/指针分析(Pointer analysis)
    在基于SAST的静态分析工具中,指向分析是经常采用的分析技术。指向分析怎么理解呢?指向分析是一种用于分析指针和内存引用所指向的变量或内存地址的静态代码分析技术。指向分析......
  • AcDbSmartObjectPointer
    描述这个类与AcDbObjectPointer协议兼容,并且增加了在给定对象id时避免访问对象的开放冲突的功能,此外还有长期存在的总是“关闭”对象或至少将其恢复到分配给指针之前的打......
  • xxl-job使用openfeign,报空指针异常(java.lang.NullPointerException)
    当使用xxl-job调用项目时,如果刚好使用了feign中间件调用微服务接口,会报空指针异常可以在代码前面加一句:RequestContextHolder.setRequestAttributes(newServletReques......
  • AcDbObjectPointerBase
    AcDbObjectPointerBase是一组模板类的基类,这些模板类简化了AcDbObjects指针的内存管理以及打开和关闭AcDbObjects。这些类提供了在创建和销毁时自动打开和关闭AcDbObjects......