2024年C C++最全Mermaid画图教程(一)_mermaid绘图,温故而知新

img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上C C++开发知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

如果你需要这些资料,可以戳这里获取

three

one

不同子图元素
之间的连接

子图内部元素
之间的连接

子图之间的连接

c2

c1

two

b2

b1

a2

a1

graph

graph LR
	%% flowchart改为graph也可以
	%% 风格1,用红色填充,边框用蓝色,边框宽度两个像素
	classDef mystyle1 fill:#f00, stroke:#00f, stroke-width:2px;
	classDef mystyle2 fill:#0f0, stroke:#f00, stroke-width:4px;
	classDef mystyle3 fill:#00f, stroke:#0f0, stroke-width:8px,color:#fff,stroke-dasharray: 6 3
	classDef default fill:#f9f,stroke:#333,stroke-width:4px;
	%% :::表示继承类(风格)
	D[(默认风格)]
	B(绿色填充<br/>红边框<br/>圆角):::mystyle2 --> D
	C[蓝色填充<br/>绿色边框<br/>白色字体]:::mystyle3 --> D
	%% D默认为default风格
	
	e((显示特别<br/>的符号)) -->|"f(,.?!+-\*ز)"| f(,.?!+-\*ز)
	
	C --> b2
	subgraph subgraph1
		a1{"{菱形}"} --- a2[/"[/梯形\]"\]
	end
	subgraph subgraph2
		b1[["[[xxx]]"]] -->|子图内部元<br/>素的连接| b2(["([圆角])"])
	end
	%% graph图形是不能在子图之间进行连接,但是子图内部的元素还是可以
	%% subgraph1 --> subgraph2
	%% a1 -->|子图元素<br/>之间的连接| b1

#mermaid-svg-rsRVtqLFWKs11WWT .label{font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family);fill:#333;color:#333}#mermaid-svg-rsRVtqLFWKs11WWT .label text{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .node rect,#mermaid-svg-rsRVtqLFWKs11WWT .node circle,#mermaid-svg-rsRVtqLFWKs11WWT .node ellipse,#mermaid-svg-rsRVtqLFWKs11WWT .node polygon,#mermaid-svg-rsRVtqLFWKs11WWT .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-rsRVtqLFWKs11WWT .node .label{text-align:center;fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .node.clickable{cursor:pointer}#mermaid-svg-rsRVtqLFWKs11WWT .arrowheadPath{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-rsRVtqLFWKs11WWT .flowchart-link{stroke:#333;fill:none}#mermaid-svg-rsRVtqLFWKs11WWT .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-rsRVtqLFWKs11WWT .edgeLabel rect{opacity:0.9}#mermaid-svg-rsRVtqLFWKs11WWT .edgeLabel span{color:#333}#mermaid-svg-rsRVtqLFWKs11WWT .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-rsRVtqLFWKs11WWT .cluster text{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-rsRVtqLFWKs11WWT .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-rsRVtqLFWKs11WWT text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-rsRVtqLFWKs11WWT .actor-line{stroke:grey}#mermaid-svg-rsRVtqLFWKs11WWT .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-rsRVtqLFWKs11WWT .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-rsRVtqLFWKs11WWT #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-rsRVtqLFWKs11WWT .sequenceNumber{fill:#fff}#mermaid-svg-rsRVtqLFWKs11WWT #sequencenumber{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT #crosshead path{fill:#333;stroke:#333}#mermaid-svg-rsRVtqLFWKs11WWT .messageText{fill:#333;stroke:#333}#mermaid-svg-rsRVtqLFWKs11WWT .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-rsRVtqLFWKs11WWT .labelText,#mermaid-svg-rsRVtqLFWKs11WWT .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-rsRVtqLFWKs11WWT .loopText,#mermaid-svg-rsRVtqLFWKs11WWT .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-rsRVtqLFWKs11WWT .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-rsRVtqLFWKs11WWT .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-rsRVtqLFWKs11WWT .noteText,#mermaid-svg-rsRVtqLFWKs11WWT .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-rsRVtqLFWKs11WWT .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-rsRVtqLFWKs11WWT .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-rsRVtqLFWKs11WWT .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-rsRVtqLFWKs11WWT .mermaid-main-font{font-family:“trebuchet ms”, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT .section{stroke:none;opacity:0.2}#mermaid-svg-rsRVtqLFWKs11WWT .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-rsRVtqLFWKs11WWT .section2{fill:#fff400}#mermaid-svg-rsRVtqLFWKs11WWT .section1,#mermaid-svg-rsRVtqLFWKs11WWT .section3{fill:#fff;opacity:0.2}#mermaid-svg-rsRVtqLFWKs11WWT .sectionTitle0{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .sectionTitle1{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .sectionTitle2{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .sectionTitle3{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-rsRVtqLFWKs11WWT .grid .tick text{font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT .grid path{stroke-width:0}#mermaid-svg-rsRVtqLFWKs11WWT .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-rsRVtqLFWKs11WWT .task{stroke-width:2}#mermaid-svg-rsRVtqLFWKs11WWT .taskText{text-anchor:middle;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT .taskText:not([font-size]){font-size:11px}#mermaid-svg-rsRVtqLFWKs11WWT .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-rsRVtqLFWKs11WWT .task.clickable{cursor:pointer}#mermaid-svg-rsRVtqLFWKs11WWT .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-rsRVtqLFWKs11WWT .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-rsRVtqLFWKs11WWT .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-rsRVtqLFWKs11WWT .taskText0,#mermaid-svg-rsRVtqLFWKs11WWT .taskText1,#mermaid-svg-rsRVtqLFWKs11WWT .taskText2,#mermaid-svg-rsRVtqLFWKs11WWT .taskText3{fill:#fff}#mermaid-svg-rsRVtqLFWKs11WWT .task0,#mermaid-svg-rsRVtqLFWKs11WWT .task1,#mermaid-svg-rsRVtqLFWKs11WWT .task2,#mermaid-svg-rsRVtqLFWKs11WWT .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-rsRVtqLFWKs11WWT .taskTextOutside0,#mermaid-svg-rsRVtqLFWKs11WWT .taskTextOutside2{fill:#000}#mermaid-svg-rsRVtqLFWKs11WWT .taskTextOutside1,#mermaid-svg-rsRVtqLFWKs11WWT .taskTextOutside3{fill:#000}#mermaid-svg-rsRVtqLFWKs11WWT .active0,#mermaid-svg-rsRVtqLFWKs11WWT .active1,#mermaid-svg-rsRVtqLFWKs11WWT .active2,#mermaid-svg-rsRVtqLFWKs11WWT .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-rsRVtqLFWKs11WWT .activeText0,#mermaid-svg-rsRVtqLFWKs11WWT .activeText1,#mermaid-svg-rsRVtqLFWKs11WWT .activeText2,#mermaid-svg-rsRVtqLFWKs11WWT .activeText3{fill:#000 !important}#mermaid-svg-rsRVtqLFWKs11WWT .done0,#mermaid-svg-rsRVtqLFWKs11WWT .done1,#mermaid-svg-rsRVtqLFWKs11WWT .done2,#mermaid-svg-rsRVtqLFWKs11WWT .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-rsRVtqLFWKs11WWT .doneText0,#mermaid-svg-rsRVtqLFWKs11WWT .doneText1,#mermaid-svg-rsRVtqLFWKs11WWT .doneText2,#mermaid-svg-rsRVtqLFWKs11WWT .doneText3{fill:#000 !important}#mermaid-svg-rsRVtqLFWKs11WWT .crit0,#mermaid-svg-rsRVtqLFWKs11WWT .crit1,#mermaid-svg-rsRVtqLFWKs11WWT .crit2,#mermaid-svg-rsRVtqLFWKs11WWT .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-rsRVtqLFWKs11WWT .activeCrit0,#mermaid-svg-rsRVtqLFWKs11WWT .activeCrit1,#mermaid-svg-rsRVtqLFWKs11WWT .activeCrit2,#mermaid-svg-rsRVtqLFWKs11WWT .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-rsRVtqLFWKs11WWT .doneCrit0,#mermaid-svg-rsRVtqLFWKs11WWT .doneCrit1,#mermaid-svg-rsRVtqLFWKs11WWT .doneCrit2,#mermaid-svg-rsRVtqLFWKs11WWT .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-rsRVtqLFWKs11WWT .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-rsRVtqLFWKs11WWT .milestoneText{font-style:italic}#mermaid-svg-rsRVtqLFWKs11WWT .doneCritText0,#mermaid-svg-rsRVtqLFWKs11WWT .doneCritText1,#mermaid-svg-rsRVtqLFWKs11WWT .doneCritText2,#mermaid-svg-rsRVtqLFWKs11WWT .doneCritText3{fill:#000 !important}#mermaid-svg-rsRVtqLFWKs11WWT .activeCritText0,#mermaid-svg-rsRVtqLFWKs11WWT .activeCritText1,#mermaid-svg-rsRVtqLFWKs11WWT .activeCritText2,#mermaid-svg-rsRVtqLFWKs11WWT .activeCritText3{fill:#000 !important}#mermaid-svg-rsRVtqLFWKs11WWT .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT g.classGroup text{fill:#9370db;stroke:none;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family);font-size:10px}#mermaid-svg-rsRVtqLFWKs11WWT g.classGroup text .title{font-weight:bolder}#mermaid-svg-rsRVtqLFWKs11WWT g.clickable{cursor:pointer}#mermaid-svg-rsRVtqLFWKs11WWT g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-rsRVtqLFWKs11WWT g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-rsRVtqLFWKs11WWT .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-rsRVtqLFWKs11WWT .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-rsRVtqLFWKs11WWT .dashed-line{stroke-dasharray:3}#mermaid-svg-rsRVtqLFWKs11WWT #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT .commit-id,#mermaid-svg-rsRVtqLFWKs11WWT .commit-msg,#mermaid-svg-rsRVtqLFWKs11WWT .branch-label{fill:lightgrey;color:lightgrey;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT .slice{font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-rsRVtqLFWKs11WWT g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-rsRVtqLFWKs11WWT g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-rsRVtqLFWKs11WWT g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-rsRVtqLFWKs11WWT .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-rsRVtqLFWKs11WWT .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-rsRVtqLFWKs11WWT .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-rsRVtqLFWKs11WWT .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-rsRVtqLFWKs11WWT .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-rsRVtqLFWKs11WWT .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-rsRVtqLFWKs11WWT .edgeLabel text{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:‘trebuchet ms’, verdana, arial;font-family:var(–mermaid-font-family)}#mermaid-svg-rsRVtqLFWKs11WWT .node circle.state-start{fill:black;stroke:black}#mermaid-svg-rsRVtqLFWKs11WWT .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-rsRVtqLFWKs11WWT #statediagram-barbEnd{fill:#9370db}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-state .divider{stroke:#9370db}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-rsRVtqLFWKs11WWT .note-edge{stroke-dasharray:5}#mermaid-svg-rsRVtqLFWKs11WWT .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{–mermaid-font-family: ‘“trebuchet ms”, verdana, arial’;–mermaid-font-family: “Comic Sans MS”, “Comic Sans”, cursive}#mermaid-svg-rsRVtqLFWKs11WWT .error-icon{fill:#522}#mermaid-svg-rsRVtqLFWKs11WWT .error-text{fill:#522;stroke:#522}#mermaid-svg-rsRVtqLFWKs11WWT .edge-thickness-normal{stroke-width:2px}#mermaid-svg-rsRVtqLFWKs11WWT .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-rsRVtqLFWKs11WWT .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-rsRVtqLFWKs11WWT .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-rsRVtqLFWKs11WWT .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-rsRVtqLFWKs11WWT .marker{fill:#333}#mermaid-svg-rsRVtqLFWKs11WWT .marker.cross{stroke:#333}

:root { --mermaid-font-family: “trebuchet ms”, verdana, arial;}
#mermaid-svg-rsRVtqLFWKs11WWT .mystyle1 > * { fill:#f00 !important; stroke:#00f !important; stroke-width:2px !important; }
#mermaid-svg-rsRVtqLFWKs11WWT .mystyle1 tspan { !important; }
#mermaid-svg-rsRVtqLFWKs11WWT .mystyle2 > * { fill:#0f0 !important; stroke:#f00 !important; stroke-width:4px !important; }
#mermaid-svg-rsRVtqLFWKs11WWT .mystyle2 tsp

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值