CSS - CSS3 pixelate dot background

itsme picture itsme · Nov 28, 2012 · Viewed 66.1k times · Source

Is it possible or is there a trick to make a background pixelated like the one in the image attached?

I use a background image, but as you can see it doesn't scale and it flashs on page scrolling.

Enter image description here

Now I have CSS thanks to vlcekmi3:

background-color: white;
background-image: linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black),
    linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black);
background-size:100px 100px;
background-position: 0 0, 50px 50px;

But I'm unable to make it exactly like the image. Can someone check it?

Any code, resource, tutorial, and suggestion is appreciated.

Answer

Onimusha picture Onimusha · Jul 27, 2013

From thirtydot's comment in the first post. Should have posted it as an answer - Brilliant. I almost missed it. Please rate his comment up :) I am only posting this as an answer so it might help others as it helped me.

Using a base64 encoded message:

background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABZJREFUeNpi2r9//38gYGAEESAAEGAAasgJOgzOKCoAAAAASUVORK5CYII=);

http://jsfiddle.net/thirtydot/v7T98/3/