简单的美人鱼图失败 [英] Simple mermaid graph fails

查看:170
本文介绍了简单的美人鱼图失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从美人鱼网站运行



同时,



我唯一缺少的是线条颜色,但加入这个CSS修正了这个问题:

  path {
stroke:black;
}


I tried to run the example from the mermaid site (a working copy is on codepen.io):

<script src="https://cdn.rawgit.com/knsv/mermaid/0.5.1/dist/mermaid.min.js"></script>
<script>mermaid.initialize({startOnLoad:true});</script>

<div class="mermaid">

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;

</div>

The output is:

At the same time, a sequence diagram works great.

Where is the problem with the basic example?

Update

The issue was with Chrome 48 compatibility. It is fixed by using the latest js file:

<script src="https://cdn.rawgit.com/knsv/mermaid/master/dist/mermaid.min.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/knsv/mermaid/master/dist/mermaid.css">

解决方案

It looks ok in Safari:

The only thing that was missing for me was the line colour, but adding this css fixed that:

path {
  stroke: black;
}

这篇关于简单的美人鱼图失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆