本文最后更新于:4 个月前

UBYUeg.png
要实现上面的效果,首先必须了解一些参数👇

所需参数

您必须为以下每个 URL 参数声明一个值:

选项 描述
user 拥有仓库的 GitHub 用户名
repo GitHub 仓库名称
type 要显示的按钮类型: starwatchforksponsorfollow

可选参数

不需要以下 URL参数。根据需要添加它们。

选项 描述
count 显示可选的观察器或分叉计数:默认情况下没有或true
size 用于使用较大按钮的可选标志:默认情况下没有或large

Star

<iframe src="https://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=star&count=true&size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>

<iframe src="https://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=star&count=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>

Watch

<iframe src="https://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=watch&count=true&size=large&v=2" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>

<iframe src="https://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=watch&count=true&v=2" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>

Fork

<iframe src="https://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>

<iframe src="https://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=fork&count=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>

可用选项

SSL 支持

示例按钮与 URL 一起显示。当 SSL 选项托管在 GitHub 页面上时,SSL 选项通过CloudFlare 的免费通用 SSL 产品提供。如果您愿意,您仍然可以使用 。https:// http://


更多

详见文档:https://ghbtns.com/


本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!

随机图片API 上一篇
[转]KMP 算法详解 下一篇

 目录