participant是否可以在不使用全局设置的情况下更改特定的边框/字体颜色skinparam?
对于特定的情况participant,我需要具有与 中定义不同的边框+字体颜色skinparam。
使用用户定义的样式在文档中找到了解决方案:
skinparam useBetaStyle true
<style>
' scope to sequenceDiagram elements
sequenceDiagram {
' define a new style, using CSS class syntax
.todo {
FontColor white
LineColor #52A0DC
BackgroundColor #52A0DC
}
.exists {
LineColor #a9a9a9
BackgroundColor #a9a9a9
}
}
}
</style>
participant Dockerfile <<todo>>
participant "AWS SSM" as SSM <<exists>>
Run Code Online (Sandbox Code Playgroud)
结果符合预期: