【发布时间】:2021-09-24 09:21:57
【问题描述】:
【问题讨论】:
标签: javascript html css github icons
【问题讨论】:
标签: javascript html css github icons
转到https://buttons.github.io 并选择“星号”并确保选择了“大按钮”和“显示计数”。现在,您需要做的就是在“预览和代码”<textarea> 字段中复制相关的 HTML。
这是您需要的生成代码。
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!-- Place this tag where you want the button to render. -->
<a class="github-button"
href="https://github.com/ntkme/github-buttons"
data-icon="octicon-star"
data-size="large"
data-show-count="true"
aria-label="Star ntkme/github-buttons on GitHub">Star</a>
这是一个带有特定用户和 repo (Facebook React) 的暗版:
body { background: #222; }
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!-- Place this tag where you want the button to render. -->
<a class="github-button"
href="https://github.com/facebook/react"
data-color-scheme="no-preference: dark; light: light; dark: dark;"
data-icon="octicon-star"
data-size="large"
data-show-count="true"
aria-label="Star facebook/react on GitHub">Star</a>
【讨论】: