1. @startuml
  2. title 使用方括号([])表示的线混合样式
  3. class foo
  4. class bar
  5. bar1 : [#red,thickness=1]
  6. bar2 : [#red,dashed,thickness=2]
  7. bar3 : [#green,dashed,thickness=4]
  8. bar4 : [#blue,dotted,thickness=8]
  9. bar5 : [#blue,plain,thickness=16]
  10. foo --> bar :
  11. foo -[#red,thickness=1]-> bar1 : [#red,1]
  12. foo -[#red,dashed,thickness=2]-> bar2 : [#red,dashed,2]
  13. foo -[#green,dashed,thickness=4]-> bar3 : [#green,dashed,4]
  14. foo -[#blue,dotted,thickness=8]-> bar4 : [blue,dotted,8]
  15. foo -[#blue,plain,thickness=16]-> bar5 : [blue,plain,16]
  16. @enduml

样式实际使用