I've been trying to create a radial background, except for some reason all I can get is a line. I have no idea what I'm doing wrong, any ideas?
Jsfiddle: http://jsfiddle.net/3QSFj/1/
CSS:
background: -webkit-gradient(radial, circle, 0, circle, 70, color-stop(0%, #718aa7), color-stop(70%, #203044));
background: -webkit-radial-gradient(circle, #718aa7 0%, #203044 70%);
background: -moz-radial-gradient(circle, #718aa7 0%, #203044 70%);
background: -o-radial-gradient(circle, #718aa7 0%, #203044 70%);
background: radial-gradient(circle, #718aa7 0%, #203044 70%);
Definition and Usage. The radial-gradient() function sets a radial gradient as the background image. A radial gradient is defined by its center. To create a radial gradient you must define at least two color stops.
Creating CSS3 Linear Gradients To create a linear gradient you must define at least two color stops. However to create more complex gradient effects you can define more color stops. Color stops are the colors you want to render smooth transitions among.
If the linear colors are located perpendicular to the line that sets the direction, then the radial colors diverge from the specified center, and the gradient can take the form of a circle or ellipse. In addition to colors, you can set the gradient shape, position, and size.
To create a radial gradient you must also define at least two color stops. By default, shape is ellipse, size is farthest-corner, and position is center. The following example shows a radial gradient with differently spaced color stops: The shape parameter defines the shape.
Set your body
height
to 100%
, your body
element is empty, and thus it doesn't have any height
, the background
is simply repeated
there.. Bad Demo
html, body {
height: 100%;
}
Demo
Also, you background
will be repeated, so you will need background-attachment: fixed;
as well as background-repeat: no-repeat
Demo 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With