Introduction to two examples of gradients in CSS3

Source: Internet
Author: User

This article brings you the content is about the two CSS3 in the example of the introduction of a certain reference value, there is a need for friends to refer to, I hope to help you.

Css3
Ps:css more and more real like a language, CSS already has variables, just see the document. A function of experimental nature.

Gradient

Gradients are divided into two gradients, a linear gradient and a radial gradient

Linear gradient

The linear gradient is up, down, left, and right in both ways.

Linear-gradient () function

This is a function of CSS. A linear gradient consists of one axis, or gradient line. Each point on it has two or more colors. Each point on its axis has a separate color. To build a smooth gradient, the function also constructs a series of shading lines. The color of each shading line also depends on the color point on the gradient line that intersects it vertically.

Gradient axis 45 degrees, heavy blue to red linear-gradient (45deg, blue, red);

From lower right to upper left, the blue gradient to the red linear-gradient (to top, blue, red);

From bottom to top, beginning with blue gradient, to height 40% position is green gradient start, end with red ending linear-gradient (0deg, blue, green 40%, red)

PS transparency is the last parameter of RGBA

Radial gradient

A radial gradient consists of its center point, edge shape, outline, its position, and the end point of the color value.
The radial gradient is made up of the ellipse continuously.

First parameter

The first parameter is generally saved,

Closest-side

Closest-corner

Closest-side

Farthest-corner

Circle at percent

Write separately

Percent Sign

Related Article

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.