太強了, 教你怎麼在博客園 Markdown 使用SVG 矢量圖

廢話先很少說,直接上個圖說明問題:html

R1
R1
R2
R2
R5
R5
R3
R3
R4
R4
I
I
U
U
I5
I5
Is1
Is1
Is2
Is2
Is3
Is3

聰明的小夥伴固然選擇直接查看網頁源代碼了

對就是網頁源代碼中,在博客園的 Markdown 格式的博客中,是能夠解析一些 html 標籤的,我用的就是簡單的 <div> 與 <svg> 標籤。一般的方法是下面這樣的:node

<table>
  <tr>
    <td>
      <svg width="140" height="170">
        <title>SVG Sample</title>
        <desc>This is a sample to use SVG in markdown on the website cnblogs.</desc>
        <circle cx="70" cy="95" r="50" style="stroke: black; fill: none;"/>
      </svg>
    </td>
  </tr>
</table>

或者是web

<div width="100%" style="overflow-x: auto;"> 
  <svg width="140" height="170">
    <title>SVG Sample</title>
    <desc>This is a sample to use SVG in markdown on the website cnblogs.</desc>
    <circle cx="70" cy="95" r="50" style="stroke: black; fill: none;"/>
  </svg>
</div>

這樣的
那麼代碼能夠轉 SVG, 那麼 SVG 可不能夠轉代碼呢?
這裏我要吹爆 畫圖軟件
對,他能夠直接講 SVG 以源代碼的格式導出,畫圖的時候以 SVG 源代碼格式導出,直接放在 <div> 標籤裏面,就能夠了:
markdown


H
H
G
G
F
F
E
E
D
D
C
C
B
B
A
A
HA
HA
AB
AB
ABC
ABC
BC
BC
BCD
BCD
CD
CD
ED
ED
CDE
CDE
EF
EF
DEF
DEF
EFG
EFG
FG
FG
FGH
FGH
GH
GH
GHA
GHA
ABH
ABH
BDE
BDE
CDEF
CDEF
DEFG
DEFG
EFGH
EFGH
FGHA
FGHA
ABGH
ABGH
ABCH
ABCH
ABCD
ABCD
BCEF
BCEF
ABCGH
ABCGH
ABCDEFGH
ABCDEFGH

$n\left(w_{2}, 1\right)$
$n\left(w_{2}, 1\right)$
相關文章
相關標籤/搜索