


























copy-used-css,将指定节点的计算样式获取下拉 获取tailwind网页样式成原生样式
(() => {
if (!$0) { console.warn('先先在 Elements 面板里选中一个节点!'); return; }
const el = $0;
const comp = getComputedStyle(el);
const initial = document.createElement(el.tagName);
document.body.appendChild(initial);
const initStyle = getComputedStyle(initial);
const used = [...comp]
.filter(k => comp[k] !== initStyle[k] && !k.startsWith('-')) // 去掉私有前缀
.map(k => `${k}: ${comp.getPropertyValue(k)};`)
.join('\n');
copy(used);
initial.remove();
console.log('已复制非默认样式:\n', used);
})();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。