The gradient property does not work ok on my android's dolphin browser, version 9.0.1. Here is the css: position: absolute; top: 0; left: 0; width: 320px; height. Visual CSS Gradient Generator 1.0.0.0 add to watchlist send us an update. 7 screenshots: runs on: Windows 7 32/64 bit Windows Vista 32/64 bit file size: 376 KB filename.
Caution! Hello there, intrepid explorer! This post is old. The content might be out of date, and our opinions might have changed.
Ever used CSS gradients and thought “Urghh!”. We have. Here's a quick post about making them smooth as peanut butter.
Linear Gradient Css
We've had a couple of sites lately that use CSS gradients behind some text. This let us have a background image of any (or a mix of) colours, and still keep the text nicely readable.
The issue is, in the default state, CSS gradients can look a bit.. gross. I'm sure some of you have written gradients like this:
Which works and you get a gradient that goes from solid black to transparent. Unfortunately you probably also get a nasty looking hard edge line going across the element. Check out this example screen shot:
In looking for a fix for this, I stumbled across this post on CSS Tricks by the clever and talented Andreas Larsen, which explains how to make them much nicer using physics, maths and diagrams of motorway intersections. Don't let that description put you off though, is an interesting read. The trick is to create a curve to ease your gradients on and then add the appropriate stops in your CSS. More like this:
This creates a gradient more like this: Euro truck simulator 1 4 0.
It's called a Scrim. I know what your thinking, that looks complicated. How do I use that? Well Andreas created a Post CSS plugin to smooth all your gradient troubles. Pretty sweet. Inspired by this I created a SCSS mixin to achieve the same thing.
I hear you like syntax highlighting? I've got your back over here in this Gist.
Here's a comparison of the two techniques, which shows makes the difference more obvious:
More posts
Caution! Hello there, intrepid explorer! This post is old. The content might be out of date, and our opinions might have changed.
Ever used CSS gradients and thought “Urghh!”. We have. Here's a quick post about making them smooth as peanut butter.
We've had a couple of sites lately that use CSS gradients behind some text. This let us have a background image of any (or a mix of) colours, and still keep the text nicely readable. Butler 422 homes.
The issue is, in the default state, CSS gradients can look a bit.. gross. I'm sure some of you have written gradients like this:
Which works and you get a gradient that goes from solid black to transparent. Unfortunately you probably also get a nasty looking hard edge line going across the element. Check out this example screen shot:
In looking for a fix for this, I stumbled across this post on CSS Tricks by the clever and talented Andreas Larsen, which explains how to make them much nicer using physics, maths and diagrams of motorway intersections. Don't let that description put you off though, is an interesting read. The trick is to create a curve to ease your gradients on and then add the appropriate stops in your CSS. More like this:
This creates a gradient more like this:
Css Gradient Ie9
It's called a Scrim. I know what your thinking, that looks complicated. How do I use that? Well Andreas created a Post CSS plugin to smooth all your gradient troubles. Pretty sweet. Inspired by this I created a SCSS mixin to achieve the same thing.
Css Gradient Generator
I hear you like syntax highlighting? Ipack 2 3 4 x 5. I've got your back over here in this Gist.
Here's a comparison of the two techniques, which shows makes the difference more obvious: