View Full Version : Rounded gradients

01-01-2013, 11:24 AM
Please help to make CSS as a rounded fade effect with CSS3. Any idea how to make css?

01-01-2013, 03:37 PM
can you maybe just use border-radius and schadow-box? with a little testing you maybe get the perfect combination!!

01-02-2013, 12:28 PM
Hi there webdevs,

here is an example that works in Firefox, Safari, Chrome and partially in Opera...

<html lang="en">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">

<title>radial gradient</title>

<style type="text/css">
body {
div {
border:1px solid #5af;
margin:50px auto;
box-shadow:16px 16px 16px rgba(0,0,0,0.4);
background:-webkit-radial-gradient( circle, #0ff 0%,rgba(0, 0, 255, 0) 100%, #00f 95%);
background:radial-gradient( circle, #0ff 0%, rgba(0, 0, 255, 0) 100%, #00f 95%);



..and some...

Further reading:-



01-03-2013, 07:47 AM
here is an example that works in Firefox, Safari, Chrome and partially in Opera...

background:radial-gradient( circle, #0ff 0%, rgba(0, 0, 255, 0) 100%, #00f 95%);Chrome and Firefox appear to be the bugged browsers here.

If you substitute the keyword transparent for rgba(0, 0, 255, 0) (both of those values refer to the same color), the resulting radial gradient changes in Firefox 17 and Chrome 23 to include a gray hue, indicating that those two browsers have rendering issues: rgba(0, 0, 255, 0) is not be treated as the equivalent of transparent, and transparency in general is broken.

In Internet Explorer 10 RP1 and Opera 12.1, the rendering is the same using either value and both browsers render the gradient identically.

Basically, the Chrome/Firefox gradient has to be scrapped or recreated using different color stops to be cross-browser-compatible.

On another note, the color stop #00f 95% (blue 95%) doesn't appear to do anything. The latest draft of the spec (http://dev.w3.org/csswg/css3-images/), unfortunately, doesn't appear say what to do with color stops that are specified after the final color stop at 100%. All four browsers seem to silently ignore the last stop in this code. I noticed that an almost identical useless stop appears in Mozilla's (outdated) documentation on radial gradients (https://developer.mozilla.org/en-US/docs/CSS/radial-gradient), so maybe that's where this stop came from.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum