CSS3 Gradient Effect

Source: Internet
Author: User

I. Linear gradient linear-gradient

1. How to use:

Background:-webkit-linear-gradient (Red,blue);
Background:-moz-linear-gradient (Red,blue);
Background:linear-gradient (Red,blue);


2. Expand your Application

Spot:
<style>
. box{width:300px;height:300px;transition:1s;
Background:-webkit-linear-gradient ( -30deg,rgba (255,255,255,0) 0,rgba (255,255,255,0) 150px,rgba (255,255,255,0.9) 170px,rgba (255,255,255,0.9) 180px,rgba (255,255,255,0) 210px) no-repeat-220px 0,url ("Img/new_bg.png") no-repeat;}
. box:hover{background-position:300px 0,-100px-100px;}
</style>


<body>
<div class= "box" ></div>
</body>

Two. Radial Gradient radial-gradient

1. How to use:

Background:-webkit-radial-gradient (Red,blue);

background:-webkit-radial-gradient (100px 50px,circle,red,blue);    shape: ellipse, Circle, or  Firefox currently supports only keywords

Three. Compatibility issues

 <STYLE>  
box{width:300px;height:300px;
Background:-webkit-linear-gradient (red,blue);//saifari Google
Background:-moz-linear-gradient (red,blue);// Compatible with FF
Background:linear-gradient (red,blue);//ie11 10
Filter:progid:DXImageTransform.Microsoft.gradient ( Startcolorstr= ' Red ', endcolorstr= ' Blue ', gradienttype= ' 0 ');} Compatible with IE 9 to 6 only compatible with linear gradient gradienttype= ' 0 ' or ' 1 '

</style>

<body>
<div class= "box" ></div>
</body>

CSS3 Gradient Effect

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.