\documentclass[border=100pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[circle, shading=ball, drop shadow, ball color=red!10!black, minimum width=4cm, color=white, opacity=.5, label={[blue]left:A}] (ball1) at (0,0) {BALL 1};
\node[circle, shading=ball, drop shadow, ball color=red!20!black, minimum width=4cm, color=white, opacity=.5, label={[red]right:B}, xshift=5cm] (ball2) at (2,0) {BALL 2};
\end{tikzpicture}
\end{document}
答案1
您可以根据需要使用任意数量的标签:只需声明几个label
选项即可。但如果您想用线/箭头连接标签和节点,请使用pin
。
\documentclass[border=100pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows}
\begin{document}
\begin{tikzpicture}
\node[circle, shading=ball, drop shadow, ball color=red!20!black,
minimum width=4cm, color=white, opacity=.5,
label={[red]right:B},
label={[blue]135:A},
pin={45:C},
pin={[pin distance=1cm, pin edge={<-, shorten <= 1pt, red}]below:D}]
(ball2) {BALL 2};
\end{tikzpicture}
\end{document}