<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.mermaid {
display: inline-block;
}
.cssClass:hover > rect {
fill: #FF0000 !important;
stroke: #FFFF00 !important;
stroke-width: 4px !important;
}
</style>
</head>
<body>
<div class="mermaid">
flowchart TD
A(串口) --> 1(控制器1)
A(串口) --> 2(控制器2)
A(串口) --> 3(控制器3)
A(串口) --> 4(控制器4)
A(串口) --> 5(控制器5)
class 1 cssClass
click 1 call aaa() "这是一段鼠标悬浮的提示"
</div>
<div class="mermaid">
flowchart TD
A(串口) --> 1(控制器1)
A(串口) --> 2(控制器2)
A(串口) --> 3(控制器3)
A(串口) --> 4(控制器4)
A(串口) --> 5(控制器5)
</div>
<div class="mermaid">
flowchart TD
A(串口) --> 1(控制器1)
A(串口) --> 2(控制器2)
A(串口) --> 3(控制器3)
A(串口) --> 4(控制器4)
A(串口) --> 5(控制器5)
</div>
<div class="mermaid">
flowchart TD
A(串口) --> 1(控制器1)
A(串口) --> 2(控制器2)
A(串口) --> 3(控制器3)
A(串口) --> 4(控制器4)
A(串口) --> 5(控制器5)
</div>
<div class="mermaid">
flowchart TD
A(串口) --> 1(控制器1)
A(串口) --> 2(控制器2)
A(串口) --> 3(控制器3)
A(串口) --> 4(控制器4)
A(串口) --> 5(控制器5)
</div>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<script>
mermaid.initialize({
startOnLoad: true,
securityLevel: 'loose'
});
function aaa() {
alert("自定义了一个点击事件");
}
</script>
</body>
</html>
|