10 ms·
CSS3 Patterns Gallery
- degenerate 14y agoIs it trivial to animate these? For example how easy would it be to have one of the rainbow-bokeh bubbles slowly move upward ?
- davej 14y agoYes, it would be trivial. In most cases though (including your example) you could achieve the same effect by simply animating a 32-bit PNG.
- deanclatworthy 14y agoThese look great, but performance is really poor.
- tokenizer 14y agoCould you explain this? I'd figure the performance would be greater than using an repeating image for a background.
- ux-app 14y agoPerformance is far worse because this is the equivalent of a procedural texture. With a tiling bitmap the computer simply fetches the file, then paints the pixels into a region. With a definition such as: - radial-gradient(closest-side, transparent 0%, transparent 75%, #... The browser first parses the CSS, then generates the actual bitmap data for this definition in memory then finally paints the pixels into the correct places. The in-memory bitmap generation is far more taxing than simply tiling an existing bitmap. Then there is the issue of dynamic CSS which may cause reflow which will in turn probably require more dynamic bitmap generation.
- rimantas 14y agoOne interesting thing is done while building iOS app: png images are reencoded to make them more efficient. What is done, that alpha value is premultiplied, but the more interesting thins is that bytes are rearranged from RGB to BGR . This is done to match the layout of the iPhone display, so mapping from image is even faster.
- flexie 14y agoA lot of these look great :-) If only they worked in IE 7, 8 and 9 they could be used in real projects...
- ux-app 14y agoAs a technical demo they're great. In practice though, I wouldn't recommend using these techniques because: - Many are completely broken in FF - Crashed my FF (19.0.2) and strangely sent my GPU fan into overdrive - These techniques hurt performance badly. In the case of gradients the browser has to first generate the bitmaps from the gradient definitions, apply any clipping/masks and then composite any other overlaying elements. This is far more taxing than simply grabbing a bitmap and painting into a region.
- dan15 14y agoAgree, they're great for mockups though as it's really easy to change the colours rapidly. Also good for doing things like animation of gradients.
- dave_sid 14y agonot working for me with css supplied.
- vicky_rockstar 14y agoneed to improve performance...
- gokhan 14y agoNice, but oh my poor Firefox. What's wrong with images as bg? Some numbers: The one with hearts is 944 bytes (css file), 232 bytes gzipped (with 7zip), 304 bytes as gif (Photoshop. Can be smaller with hand optimizations. Need extra css code to tile as bg) Just a tech demo IMO.
- derefr 14y ago> What's wrong with images as bg? 1. Give a content block a raster background with a pattern including lots of pixel-perfect high-contrast edges (precisely the thing there are lots of in these demos!) 2. Visit the page on a mobile device, and tap to fit. 3. Horrible antialiasing ensues. (Not to mention what happens when you zoom in further.) "CSS (vector) backgrounds" do have their use, and it's pretty much the same use as "vector icons"/"icon fonts" have: making things that look good at arbitrary scale+DPI.
- gngeal 14y ago"The one with hearts is 944 bytes (css file), 232 bytes gzipped (with 7zip)" Did you measure the compressed size on its own or as a delta inside a larger CSS file? The pattern is going to share at least a part of its dictionary with the rest of the CSS file if sent deflated.
- jstalin 14y agoThis site completely borked by firefox. Had to close and restart my browser to get out of it.
- sergiotapia 14y ago"amazing"? These look terrible and would make any website look like a throwback from Geocities. Neat that it's done with CSS3, not practical for any real purpose though.
- hmottestad 14y agoNotice how the site uses a png noise image as background and none of the css3 backgrounds.
- manojlds 14y agoI can see this being used: http://lea.verou.me/css3patterns/#lined-paper http://lea.verou.me/css3patterns/#lined-paper
- deleted 14y ago[deleted]
- saturdayplace 14y agoAll it'd take to make most of these usable is finessing the colors a bit so they don't jump off the page like they do here. It's definitely possible to make the patterns more subtle while retaining the shape effects. I viewed the page as a nifty demonstration of CSS-based patterns. Actually implementing the appropriate colors with these is left as an exercise for the reader.
- knieveltech 14y agoAccording to my laptop's cooling fan color palette is the least of the issues here. I'm pretty sure that roasting your users' CPUs to render a background texture is considered poor form.
- dbrian 14y agoWhat? I think you might have some issues there. These render instantly on my phone and on my Nexus tablet.
- __herson__ 14y agoI do not like theese backgrounds, some of them really hurt my eyes. I prefer these http://subtlepatterns.com/ http://subtlepatterns.com/ ...I know they are just png, but works and look better.
- nodata 14y agoNice. Please make the Escape key work to close the pattern popup!
- zhangtai 14y agoIt looks good, until you apply to background.
- slapresta 14y agoWhy exploiting CSS3 when SVG will do?
- omegote 14y agoThey look like crap (not only the color, but also the jagged edges), the performance is also crap... I don't know, sometimes I think these hipster web devs are getting too much attention nowadays for things that aren't that complicated or innovative in comparison to, say, many things c++ programmers face on daily basis.
- planetjones 14y agoBad performance and support only for IE10+ will put these out of consideration for many. I think the real world appeal of these will be limited to say the least.
- pacomerh 14y agoGood as an experiment, but I honestly wouldn't use any of these backgrounds.
- scotch_drinker 14y agoTo me, these are amazing in the same way fingernails on chalkboard are amazing. Every time someone nicked the chalkboard with their fingernail in school, I felt as if someone was ripping my spine out. And every time I clicked one of those circles, I felt like someone was ripping my eyes out.
- mnicole 14y agoCalm down, guys. As stated on her site, these are purely experimental. This page has also been up for a few years at this point.
- lttlrck 14y agoReal tartan doesn't have diagonal lines like that. Sorry :)
- mtgx 14y agoOnly IE+? No doubt because IE is so ridiculous behind the other browsers in HTML5 support. I can't believe even Firefox 3.6 which was released in like 2010 had proper support for CSS3 that only IE10 has now, from all the IE versions.