Shield.io常用语法

Github随处可见的小徽标怎么搞的?

Posted by yebin-yu on July 14, 2023

Shields.io

网站:https://shields.io/

单标签

示例:

<img src="https://img.shields.io/badge/Shell-61DAFBD" />

双标签

img 标签

示例:

<img src="https://img.shields.io/badge/yebin.yu-HELLO-red" />

示例:

<img src="https://img.shields.io/badge/{徽标标题}-{徽标内容}-{徽标颜色}" />
markdown 标签

示例:

![](https://img.shields.io/badge/{徽标标题}-{徽标内容}-{徽标颜色}.svg)
带跳转的markdown标签

示例:

[![](https://img.shields.io/badge/{徽标标题}-{徽标内容}-{徽标颜色}.svg)]({linkUrl})

图标

图标地址:https://simpleicons.org/

示例:

示例:

<img src="https://img.shields.io/badge/{描述}-{颜色}?logo=Gmail&logoColor=000">
<img src="https://img.shields.io/badge/yebin.yu@hotmail.com-4FC08D?logo=Gmail&logoColor=fff">

属性

style - 徽标形状

<img src="https://img.shields.io/badge/{徽标标题}-{徽标内容}-{徽标颜色}?style=flat" />

<img src="https://img.shields.io/badge/{徽标标题}-{徽标内容}-{徽标颜色}?style=flat-square" />

<img src="https://img.shields.io/badge/{徽标标题}-{徽标内容}-{徽标颜色}?style=plastic" />

<img src="https://img.shields.io/badge/{徽标标题}-{徽标内容}-{徽标颜色}?style=for-the-badge" />

<img src="https://img.shields.io/badge/{徽标标题}-{徽标内容}-{徽标颜色}?style=social" />

图标地址

https://simpleicons.org/