Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 visjs 时间轴垂直对齐(中间)组名(ID)。
visjs.org
这实际上是不可能的,因为组的高度是由标签高度的最大值和(堆叠的)项目高度确定的。
如果您的组具有已知的高度(例如,如果您不使用项目堆叠),您可以只为组标签的 CSS 提供匹配的固定高度,并添加 CSS 以将文本与中间对齐。