CSS3 Background Gradient Gradient

Source: Internet
Author: User

CSS3 Gradient is divided intolinear-gradient (linear gradient)And Radial-gradient (radial gradient). Remember that the gradient is not a property of CSS3, but a value of an attribute, although in CSS3 it is not specifically stated that the gradient is for background, but for the moment I have learned that only background will apply the gradient property (background-image can also)。

We first direct two examples to illustrate the basic usage of these two gradients: share one of the best UI front-end frames!

Linear gradient Linear-gradient:

. Code
  1. Background:-moz-linear-gradient (left, #ace, #f96);/*mozilla*/
  2. background:-webkit-gradient (Linear,0  50 %,100 % 50 %,from (# ACE), to (#f96));/*old gradient for webkit*/  
  3. Background:-webkit-linear-gradient (left, #ace, #f96):/*new gradient for webkit*/
  4. Background:-o-linear-gradient (left, #ace, #f96); /*opera11*/

 

Where the second row of-webkit-gradient是webkit内核浏览器老版本的写法。

The effect is as follows:

Radial gradient radial-gradient: share one of the best UI front-end frames!

. Code
  1. Background:-moz-radial-gradient (#ace, #f96, #1E90FF);
  2. Background:-webkit-radial-gradient (#ace, #f96, #1E90FF);

Effect:

IE browser support for gradient is significantly different from other modern browsers, we will <<CSS3 radial gradient (radial-gradient) >> and <<CSS3 Linear gradient (linear-gradient) >> Two articles are described separately.

CSS3 Background Gradient Gradient

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.