大佬教程收集整理的这篇文章主要介绍了html – 将工具提示添加到SVG rect标记,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我创建了几个< rect>的SVG地图标签,我想在鼠标悬停时显示工具提示.使用title属性很好但有没有选项如何使用CSS / Javascript / jQuery重新设置它还是有更好的选项来添加工具提示?
<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve"> <g> <rect id="1" title="There's some text" x="0" y="0" fill="#666666" width="20" height="20"/> <rect id="2" title="There's another text" x="30" y="0" fill="#666666" width="20" height="20"/> </g> </svg>
这是默认工具提示的样子……
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve"> <g> <rect id="1" fill="#666666" width="20" height="20"> <title>There's some text</title> </rect> <rect id="2" x="30" fill="#666666" width="20" height="20"> <title>There's another text</title> </rect> </g> </svg>
以上是大佬教程为你收集整理的html – 将工具提示添加到SVG rect标记全部内容,希望文章能够帮你解决html – 将工具提示添加到SVG rect标记所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。