Mona Lisa in pure CSS
81–90 of 97 posts
Re: Mona Lisa in pure CSS
#82Earlier quoted context omitted.
At least it's better than X in pure HTML5 .
And that is better than the X in pure javascript posts, with X being something which was impressive 10 years ago in other languages
Re: Mona Lisa in pure CSS
#83Earlier quoted context omitted.
You know, I was going to write that it was a given since CSS is applied to a markup language so you need some sort of markup, and that you were being pedantic. But then I thought it would be neat if someone were to make the Mona Lisa as ASCII art using only valid CSS, thus rendering a truly pure CSS version. I guess you could further argue that it isn't pure CSS because it also involves something to display the text.
You don't need HTML at all. Using pseudo elements and taking advantage of browser assumptions you can make HTML-free webpages: http://css-tricks.com/using-css-without-html/
Re: Mona Lisa in pure CSS
#84Jeez. If your underlying method is pixels, you can render any image you want. I'm afraid I'm missing the "hack" here.
But this is nothing more than using CSS for pixels. With that logic you could theoretically create anything.
Re: Mona Lisa in pure CSS
#85About ten years ago I made a converter application that converted a image (jpg/png/gif) to an HTML table. The result at the time was great. Unfortunately the generated HTML was quite verbose so it took a lot of bandwidth to download. I guess a similar conversion program has been used here and it seems that CSS these days can take off quite a bit of fat of that generated code. PS: Forgot to mention. The reason I wrote…
Re: Mona Lisa in pure CSS
#86Re: Mona Lisa in pure CSS
#87Re: Mona Lisa in pure CSS
#88Re: Mona Lisa in pure CSS
#89Re: Mona Lisa in pure CSS
#90So... It's a bitmap-image written in CSS boxshadows. It's a bitmap written in text. The resulting CSS is 247KB. Taking the same image and saving as a JPG (which I think is fair, since it's fairly blurry) results in a 40KB file. That's more than 6 times smaller. If you scale it down to the detail level found the CSS (each CSS-"pixel" being a 4x5 unit) even a PNG will easily beat it at 24KB. Here the JPG also clocks in…