基于 CSS 的 ASCII 艺术

ASCII 艺术是一种使用计算机可打印字符(一般为ASCII码中的96个可打印字符)表现图形的一种技术,传统的 ASCII 艺术基于 HTML 代码,然而由于不同浏览器的差别,在一种浏览器下可以完美显示的 ASCII 艺术,到了别的浏览器就面目全非,Web2.0 时代,应该多在 CSS 上做文章,因为目前主流浏览器对 CSS 的支持都非常一致,使用 CSS 实现 ASCII 艺术可以更好地保持不同浏览器间的兼容。

下面这个图很难想象是用 ASCII 艺术做出来的,当然为了简便,我使用的是图片,原始 ASCII 艺术版可在这里看到。

jpeg2css 是一个非常有趣的程序,你提供一副黑白的 JPG 图片给它,几秒种之内,可以为你生成一个 HTML 网页文件,你可以在该网页上看到和源 JPG 图片几乎一模一样的 ASCII 艺术图形,而且是基于 CSS 的,你不用担心该 ASCII 艺术在不同浏览器间的兼容问题。

更多基于 CSS 的 ASCII 艺术 (CSS 原始版可以在这里看到)

jpeg2css 下载地址:
http://www.romancortes.com/ficheros/jpeg2css.zip

发布者

Knight

Cast a cold Eye On Life,on Death Knight,pass by!

《基于 CSS 的 ASCII 艺术》上有108条评论

  1. Found something new in here that I had not seen explained this way before, and a quick stop at masquepourvous expanded the idea even further, the kind of writing that nudges your thinking forward a bit without forcing the issue is exactly what I look for online today and rarely actually find anywhere.

  2. Beyond the topic at hand this site reads as a small ongoing project of taking writing seriously, and a look at goldmetalshop reinforced that project quality, sites that treat publishing as an ongoing serious practice rather than as content production for traffic are sites worth supporting and this one has clearly chosen the serious approach.

  3. A piece that exhibited the kind of patience that good writing requires, and a look at savennkga continued that patient quality, hurried writing is easy to spot and this site reads as having been written without time pressure which produces a different feel than the rushed content that dominates much of the modern blog space.

  4. During a quiet evening reading session this provided just the right depth without being heavy, and a stop at ravionbondgroup maintained the same evening appropriate weight, content with depth that does not exhaust the reader is content with editorial calibration and this site has clearly figured out how to be substantial without being demanding all the time.

  5. Considered as a whole this site has developed a coherent point of view that comes through in individual pieces, and a look at dividedheartsofamericafilm continued displaying that coherence, sites with a unified perspective rather than a grab bag of takes are sites with editorial maturity and this one has clearly developed that maturity through years of work.

  6. After several visits I am now confident this site is one to follow seriously, and a stop at zaviroplex reinforced that confidence, the gradual building of trust through repeated quality exposures is the only sustainable way to develop reader loyalty and this site is building that loyalty in me through patient consistent work consistently.

  7. Came away feeling slightly smarter than I was when I started, that is a real win, and a stop at yungbludcomic added a bit more to that, the rare site that actually transfers some of its knowledge to the reader in a way that sticks rather than just creating an illusion of learning briefly.

  8. Now thinking about whether the writer might publish a longer form work I would buy, and a look at xalirobonding suggested the same depth would translate, content that makes me want to pay for related work in other formats is content that has earned commercial trust as well as attention trust and this site has both clearly.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注