TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A CSS Snippet That Makes Any HTML Page Look Good

5 点作者 lowmemcpu将近 5 年前

2 条评论

1f60c将近 5 年前
Very nice. For those of us who&#x27;d appreciate a live demo (like me), I wrote this script:<p><pre><code> document.querySelectorAll(&#x27;link[rel=&quot;stylesheet&quot;], style&#x27;).forEach((style) =&gt; style.remove()); const style = document.createElement(&quot;style&quot;); style.appendChild(document.createTextNode(&quot;body{font-family:sans-serif;line-height:140%;max-width:38rem;padding:2rem;margin:auto}h1,h2,h3,h4,h5{margin-bottom:.6rem;line-height:120%}p{margin:0 0 1rem}&quot;)); document.head.appendChild(style);</code></pre>
评论 #23879830 未加载
Geffrey将近 5 年前
Hi! Geffrey from … geffrey.io here. Thanks for posting!<p>That website is a bit wonky, sorry for that.<p>Thanks again!