廢話先不多說,直接上個圖說明問題:
對就是網頁源代碼中,在博客園的 Markdown 格式的博客中,是可以解析一些 html 標簽的,我用的就是簡單的 <div> 與 <svg> 標簽。通常的方法是下面這樣的:
<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>
或者是
<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> 標簽里面,就可以了: