Home  >  Article  >  Web Front-end  >  css3 Gradient background_html/css_WEB-ITnose

css3 Gradient background_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:43:341138browse

The gradient of CSS3 is divided into two types: linear gradient (linear) and radial gradient (radial).

1. Linear gradient linear-gradient

linear-gradient([set direction], [set start color], [set multiple transition colors], [set end color])

Parameters:

The first parameter: Specify the gradient direction, which can be represented by the "angle" keyword or "English":

The first parameter defaults to: 180deg, Equivalent to "to bottom".

There are at least 2 colors behind it, namely the starting color and the ending color.

Example:

<style type="text/css">p{    width: 300px;    height: 100px;    background-image:-webkit-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet);}</style><p>从左到右线性渐变背景</p>

2. Radial-gradient

To be continued

css3 gradient written by Da Mo

http://www.w3cplus.com/content/css3-gradient

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn