markdown中显示图片的3种方式
简介
- Markdown 是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档。
- Markdown 语言在 2004 由约翰·格鲁伯(英语:John Gruber)创建。
- Markdown 编写的文档可以导出 HTML 、Word、图像、PDF、Epub 等多种格式的文档。
- Markdown 编写的文档后缀为 .md, .markdown。
第一种
语法格式
![alt 属性文本](图片地址)
使用示例
![RUNOOB 图标](http://static.runoob.com/images/runoob-logo.png)
显示效果
第二种
语法格式
![alt 属性文本](data:image/png;base64,图片base64编码)
使用示例
![RUNOOB 图标]
(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQIAAAAnCAYAAAGTXnb3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE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Le95HFiyPFoyMWUL87EggJy3Lz6vmHTcgp6kz7a6KRDAEdUnSyp98bHcOweDztG5X+F6TMaTwjD7VOP46hGKsZXB8FXQeAO7GJV6Q9SOAoyJQMZ2/1a4RDhKehWi1wjOYLARIFItXF/fGgxcdxSoM11dAhBIOY63LgVzbMcUJsFZTxH1EFXH3DFy2OngaliLkJN6SOBndeT7zwICwsRwENU0Lt45WBcROAuIFDDVOLGzipkh2g+de8M72BgofJQeggQZ/I0J2Em4uY5VvwB0R1K2uPEgPomTEbgYBXw5tMX0QRB5RqE6rEtrh2jWcOtgaEjqPECkj1Q/WGucoEnGSQ3OiOx1qIgv4c8B+D6WmqNcMSh5gsCbDmDgZFF0TKXz2lKnYaJ+P4aNSAoEteNL7oTXK2Vvi+ttGcla6Fn/xFT9V35rEaFiQOOAAUBFfhOvGfCa7DzA4GT6ppsFgGyRp6I6/lKN45PRQaNQLdCVHhm5pUJDRM0nJkUucQMOdjy1XQfAU6JsYIXTc2g6CqZjyzmGV23OLzCHI2GHK04vDvP9kOGswUvhQQ8G/DWNMEXbmxihhG2pe1DK1Ve2CPoTfG/u2WxtybbWT3Zr1NLWa3qWISpVLmv1GOMIW4sl41z4f4HYzYmoaOuUm9tYPvHnZQ2i3jF1FuHiuwKW+3vr2JTGQ3ORbbv1veUZcRapAuFc+FujHtizBj4ymUx0h260F793LUBBBlDDnxJlH0d4+H3ANDaJwMm8JRjiHp7lByyPulDPk2qcWAKAMNQIlN3sXJjX0H1qZEPvAQM5Tjem4g73Nuo4ZDWfk1B8IpmYJEuWLJmYJEuWLEXxB9M0d//fKZ71AAAAAElFTkSuQmCC)
显示效果
第三种
语法格式
<img src="url" />
使用示例
<img src="http://static.runoob.com/images/runoob-logo.png" />
显示效果
这一种方式相比前面两种显示效果可以更加的灵活,强大,如改变图片大小,添加样式等。