bodacious
bodacious

Reputation: 6705

Is it possible to create this background effect using CSS3 and Compass?

I'm working to apply a comp provided by our designer to a website.

The effect I need to create for the background is the folowing:

enter image description here

It has a radial in the centre AND a gradient from top to bottom

Is it possible to create this effect on one element using CSS3 and Compass or would I have to build it using two layers?

Can you recommend a better way of creating the same effect?

Thanks!

Upvotes: 0

Views: 1430

Answers (1)

cimmanon
cimmanon

Reputation: 68329

If it is possible with pure CSS, it is possible with Sass/Compass. In fact, it wouldn't look a whole lot different than how you would write it with pure CSS:

.foo {
  @include background(radial-gradient(blue, transparent 10em), linear-gradient(black, white));
}

You'll need to adjust the radial-gradient to match your image, of course, but it can be done.

Upvotes: 3

Related Questions