CSS3 background Color gradient @ linear gradient

Source: Internet
Author: User

Linear gradient of background color gradient

Syntax form: Firefox browser background:-moz-linear-gradient (position/deg,startcolor,endcolor);

Opera browser Background:-o-linear-gradient (position/deg,startcolor,endcolor);

Safari and Chrome browser background:-webkit-linear-gradient (position/deg,startcolor,endcolor);//new version

The main filter is implemented under Ie. ??

Example: the first parameter is angle or top, left, etc. positional parameters, but because top, left the change is relatively single, so the general use of angle as a parameter, more conducive to the realization of a variety of gradients.

1 <!DOCTYPE HTML>2 <HTML>3 <Head>4     <title>Css3</title>5 </Head>6 <styletype= "text/css">7 . Example{8 width:100%;9 Height:500px;Ten background:linear-gradient (45deg,red,blue); one background:-webkit-linear-gradient (45deg,red,blue); a background:-o-linear-gradient (45deg,red,blue); - background:-moz-linear-gradient (45deg,red,blue); -     } the </style> - <Body> - <Divclass= "example"> - 111 + </Div> - </Body> + </HTML>

When the angle is specified, the angle is an angle that is generated by the horizontal line and the gradient lines, counterclockwise. therefore, using 0deg produces a left-to-right horizontal gradient, and 90 degrees creates a vertical gradient from the bottom to the Top.

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

CSS3 background Color gradient @ linear 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.