项目
在 GitHub 查看
stevenlei/spacingjs
stevenlei/spacingjs has 1,124 GitHub stars and 71 forks. GitHot measured +1 stars in 24 hours and +1 in 7 days. Last checked 2026-11-10 23:59 UTC. Last push 2025-06-18.
A JavaScript utility for measuring the spacing between elements on webpage.
可以做什么
- Visual Status: Green dot indicates when SpacingJS is active
- Tab Management: Automatic cleanup when switching tabs or navigating
实测星标增长
- 24小时
- +1
- 7天
- +1
- 15天
- 更新延迟
- 1个月
- 更新延迟
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.zh-Hans.md
原文Spacing JS
一个用于测量网页元素间距离的 JavaScript 小工具,用于前端开发的流程。试试看。

阅读此文档的其他语言版本:English, 繁體中文, 简体中文.
如何使用
- 在 HTML 页面中通过
<script>标签加载 Spacing.js:
- UNPKG CDN:
<script src="//unpkg.com/spacingjs" defer></script>
- jsDelivr CDN:
<script src="//cdn.jsdelivr.net/npm/spacingjs" defer></script>
将鼠标移动到一个元素上,然后按下 Alt 键(Windows)或 ⌥ Option 键(Mac)。
将鼠标移动到其他元素上,就会显示相关的测量结果。
更多选项
同时按下 Shift 键会延长测量结果的显示,这样我们就有足够时间进行屏幕截图。
Chrome 浏览器插件及 Tampermonkey 版本
你可以在 Chrome web store 下载 Chrome 浏览器的插件版本,或透过 npm run ext 打包。
参与开发
欢迎 Fork 这个 Repo 进行开发,并提交 Pull Requests。在 GitHub Issues 汇报 Bug,在 GitHub Discussions 讨论功能/想法/问题。
授权协议
Spacing.js 使用 MIT 授权