I'm Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with HTML, CSS and SVG. To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

my books

Pro CSS3 Animation, Apress, 2013

Using SVG with CSS3 and HTML5, O'Reilly, 2017

my other blogs

Massive Head Canon: Intelligent discussion of movies, books, games, and technology.

my projects

The New Defaults — A Sass color keyword system for designers. Replaces CSS defaults with improved hues and more memorable, relevant color names.

CSSslidy — an auto-generated #RWD image slider. 3.8K of JS, no JQuery.

css / gradients

css / gradients Dudley Storey Updated 2013-11-26commentwarning

Estimated reading time: 1 minute, 24 seconds

Creating the visual effect of silkscreening - forming an image out of tiny dots of color - is easy to achieve in a web page with CSS3. The technique shown here uses multiple backgrounds in a div element: one repeating radial gradient that is closely related to the polka-dot effect in my Pop-Art CSS3 Effects Article, just at a smaller cell size, combined with a greyscale filter to desaturate the colors in the image.

I’ve also placed a full-size version of the same image (supplied by P Lam Khun) in the div, set to a max-width of 100% to create a fluid, responsive design, but hidden the image by setting opacity to 0 so that the user can only see the background: the invisible image helps set the size of the div, without taking any extra load time or HTTP requests, since it is a duplicate of the background. I’ve also added a transition effect on mouse rollover for Webkit.

read more…

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.