1.创建一个dot文件,在节点属性中使用URL关键字:

target关键字指定链接打开的方式

//test.dot
digraph Arch {
A;
B [URL="http://docs.qq.com/", target="_blank"];
C;
A -> B -> C;
}

2. 生成图形:

dot -Tpng test.dot -o test.png

3. 生成HTML文件:

dot -Tcmapx test.dot -o test.html

生成的HTML如下:

<map id="Arch" name="Arch">
<area shape="poly" id="node2" href="http://docs.qq.com/" target="_blank" title="B" alt="" coords="77,125,76,118,70,111,62,106,52,103,41,101,30,103,20,106,12,111,7,118,5,125,7,133,12,139,20,145,30,148,41,149,52,148,62,145,70,139,76,133"/>
</map>

4.在HTML代码里加入一行:

<img src="test.png" usemap="#Arch"/>
<map id="Arch" name="Arch">
<area shape="poly" id="node2" href="http://docs.qq.com/" target="_blank" title="B" alt="" coords="77,125,76,118,70,111,62,106,52,103,41,101,30,103,20,106,12,111,7,118,5,125,7,133,12,139,20,145,30,148,41,149,52,148,62,145,70,139,76,133"/>
</map>

保存,打开这个HTML,就会发现B节点可点击,点击后新窗口打开了链接 docs.qq.com

Have fun!

最新文章

  1. jQuery-1.9.1源码分析系列(一)整体架构续
  2. i2c总线,设备,驱动之间的关系
  3. 纯C#实现Hook功能
  4. iOS出现&lt;object returned empty description&gt;的解决方法
  5. hdoj 2680 choose the best route
  6. java BigInteger
  7. poj2286The Rotation Game(迭代加深dfs)
  8. Windows Phone 8初学者开发—第14部分:在运行时绑定到真实的数据
  9. 美化 - DropDownList控件
  10. webpack4升级指南
  11. java配置、IntelliJ IDEA Ultimate激活、
  12. [ZJOI2012]波浪弱化版(带技巧的DP)
  13. Python序列化之Json基础
  14. ML(5)——神经网络3(随机初始化与梯度检验)
  15. font-style字体设置
  16. pgm7
  17. 矩阵乘法优化DP
  18. 防火墙 Firewalld
  19. eclipse and systemtap
  20. geoserver-manager发布style失败

热门文章

  1. Windows环境下使用pip install安装lxml库
  2. Android 网页打开app(或者打开指定页面)并且接收参数
  3. 3Delight NSI: A Streamable Render API
  4. Java中的Iterable与Iterator详解
  5. MongoDB自学(2)
  6. U盘制作启动盘
  7. Surging微服务的注意事项
  8. Neuroph开发过程
  9. 江苏省选2019Round2游记
  10. windows环境中JDK环境变量配置