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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Single-Tag Website

160 点作者 tbassetto超过 10 年前

19 条评论

arcatek超过 10 年前
I remember seeing a demo of a website which didn&#x27;t have any tag - I think the stylesheet was served by an http header that the browsers were automatically linking. I can&#x27;t find the url.<p>[edit] Here it is! It still doesn&#x27;t work in Chrome. <a href="http://css-tricks.com/using-css-without-html/" rel="nofollow">http:&#x2F;&#x2F;css-tricks.com&#x2F;using-css-without-html&#x2F;</a>
评论 #8986622 未加载
评论 #8985681 未加载
评论 #8984079 未加载
评论 #8986426 未加载
评论 #8984630 未加载
评论 #8984955 未加载
cabirum超过 10 年前
Makes text uncopiable in all browsers. Combined with entity-encoded source, this could make a decent protection against most users. Not that I approve such things.<p>[edit] unicode encoding (\67). html-entities do not work.
评论 #8984854 未加载
评论 #8984068 未加载
评论 #8984393 未加载
tshadwell超过 10 年前
You can do this &#x2F;without&#x2F; a link tag in Firefox by using a link header. Syntax is:<p>Link:&lt;[filename]&gt;;rel=stylesheet<p>It&#x27;s fun to use:<p>Link:&lt;.&gt;;rel=stylesheet<p>and detect the Accept: text&#x2F;css header to serve a css file conditionally, too.
revskill超过 10 年前
HTML is to seperate Content from Presentation. This is just a demo of capability of CSS :).
danso超过 10 年前
Well, thank goodness for accessibility requirements, at least in California. There would be plenty of site owners, including the government, who&#x27;d love to make their sites much more difficult to scrape or excerpt from.
underyx超过 10 年前
I embraced this idea a while ago on <a href="https://macko.mici.hu" rel="nofollow">https:&#x2F;&#x2F;macko.mici.hu</a> — purely for childish entertainment, without any actual content. Source here: <a href="https://github.com/underyx/mici.hu" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;underyx&#x2F;mici.hu</a><p>macko.mici.hu loosely translates to pooh.winnie.hu; mici is also the nickname a friend of mine goes by, which is why I bought the mici.hu domain.
xenonite超过 10 年前
Seems to be a clever idea for caching and reducing traffic. All static content can be stored within the CSS, which is tagged with a long HTTP expire date. This allows to send all dynamic content within a tiny HTML page that only references the CSS above, thereby adding the static content.
评论 #8986301 未加载
评论 #8984440 未加载
tuananh超过 10 年前
This is exactly what I did when a friend of mine asked how to make the text uncopy-able. I did server-side rendering, create a bunch of randomize tag and generate inline css with ::before and ::after. It was brutal but it works.
pjc50超过 10 年前
I think this shows that the &quot;Content&quot; tag in CSS is a bad idea, at least if you&#x27;re concerned about separating presentation and content. It&#x27;s a bit like a single-image website.
评论 #8987733 未加载
hharnisch超过 10 年前
Impressive! How did you end up debugging things as you were developing?
评论 #8988252 未加载
3ot超过 10 年前
meh, not even responsive. ;)
madaxe_again超过 10 年前
I see mountainous CSS abuse... now you could be really clever and do it without any elements. Go on. I dare you.
Raphael超过 10 年前
Expected a custom element.<p>&lt;x-website&gt;&lt;&#x2F;x-website&gt;
评论 #8989588 未加载
txu超过 10 年前
1. need a &#x27;compiler&#x27; to compile html and css into one css file 2. seems it can make embedding content a bit easier and cleaner. eg. embed a facebook&#x2F;twitter button.
pluma超过 10 年前
Amazing what pseudo-elements can do these days.
RubyPinch超过 10 年前
anyone know why parts of the page become links?<p>Firefox35<p>edit: Oh, I suppose the &lt;link&gt; would be styled, wouldn&#x27;t it?
ForHackernews超过 10 年前
Why would you do this?
leonardofed超过 10 年前
#CSSporn
viame超过 10 年前
Pretty cool. Thanks for sharing