Wednesday, May 27th, 2009
Category: CSS
<
p
>Chris Williams has been having some
fun with CSS gradients on a quest to create nice looking elements without images.
He uses CSS like this:
CSS:
-
-
.albumInfo {
-
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#626262), to(#000000), color-stop(.5, #202020), color-stop(.5, #000000));
-
height: 8em;
-
padding: 1em;
-
border-top: 1px solid #858585;
-
border-bottom: 1px solid #505050;
-
}
-
-
.albumInfo h1 {
-
font-weight: bold;
-
text-shadow: 0px -1px 1px black;
-
font-size: 1.2em;
-
}
-
-
ul.tracks {
-
background: -webkit-gradient(radial, 50% -70, 0, 50% 0, 200, from(#595959), to(#0d0d0d)) #0d0d0d;
-
width: 25.7em;
-
}
-
-
ul.tracks li.odd {
-
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,.05)), to(rgba(255,255,255,.05)));
-
}
-
to create elements like this:

- XAML as an everywhere presentation format
XAML, the Extensible Application Markup Language, lets .NET developers and designers define the key elements of a UI. What's more, it accommodates...
- Content Scrambling System (CSS)
Content Scrambling System (CSS) is a data encryption and authentication method used to protect digital versatile disk (DVD) movies from being...
- CSS
Content Scrambling System (CSS) is a data encryption and authentication method used to protect digital versatile disk (DVD) movies from being...
- Silverlight: Web services rich client for the browser
Microsoft's latest entry into the rich client market, Silverlight, promises to challenge Flash and Java in the browser-based Web services consumer...
- Content Scrambling System
Content Scrambling System (CSS) is a data encryption and authentication method used to protect digital versatile disk (DVD) movies from being...
Funny, I just came across a tool at westciv to play around with gradients:
Gradientifier:
http://tools.westciv.com/gradients/
Very nice subtle use of gradients, and a great example of progressive enhancement to boot.
Thanks for the mention of Gradientifier David – I only released it yesterday, and sent the Ajaxian folks an email abut it.
Right now it does linear gradients, but I’m working on radial (and SVG as well as CSS output) as well.
While looking nice, this is nothing to use in everydays design work, as it is propietary and only works in 2 browsers. So far, useless but nice looking.
@artViper: I think this is where “progressive enhancement” kicks in