答案1
为此,您不需要任何特殊的东西,只positioning
需要一些节点锚点。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[box/.style={draw,minimum
height=3.5em,minimum width=#1},box/.default=7em,>=stealth,very thick]
\node[box=5.5em] (A){};
\node[box,right=2cm of A] (B2){};
\node[box,above=1cm of B2,xshift=0.5cm] (B1){};
\node[box,below=1cm of B2,xshift=-0.5cm] (B3){};
\draw[->] (A) -- (B2);
\draw[<-] (B2.north east) -- (B2.north east|-B1.south);
\draw[->] (B2.south west) -- (B2.south west|-B3.north);
\end{tikzpicture}
\end{document}
你能也使用chains
,但在这个例子中这仍然没有意义恕我直言。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{chains}
\begin{document}
\begin{tikzpicture}[box/.style={draw,minimum
height=3.5em,minimum width=#1},box/.default=7em,>=stealth,very thick]
\begin{scope}[start chain=B going below,node distance=1cm,
nodes={box,xshift=-5mm,on chain}]
\node{};
\node{};
\node{};
\end{scope}
\node[box=5.5em,left=2cm of B-2] (A){};
\draw[->] (A) -- (B-2);
\draw[<-] (B-2.north east) -- (B-2.north east|-B-1.south);
\draw[->] (B-2.south west) -- (B-2.south west|-B-3.north);
\end{tikzpicture}
\end{document}