Border-radius, box-shadow, and gradient )., Css3border-radius

Source: Internet
Author: User

Border-radius, box-shadow, and gradient )., Css3border-radius

Prefix


-Moz (for example,-moz-border-radius) is used for Firefox.
-Webkit (for example,-webkit-border-radius) is used for Safari and Chrome.

 

Css3 rounded corner code

<div class="radius"></div>.radius {    padding:10px; width:300px; height:50px;    border: 5px solid #dedede;    -moz-border-radius: 15px;      /* Gecko browsers */    -webkit-border-radius: 15px;   /* Webkit browsers */    border-radius:15px;            /* W3C syntax */}

Effect:

Other statements:

Border-radius: 5px 15px 20px 25px;
Upper right lower left



Css3 shadow:


Syntax:

Outer shadow: box-shadow: x y Npx # color;

Inner shadow: box-shadow: inset x y Npx # color;

First attribute: X axis of the Shadow (negative values can be used)

Second attribute: Y axis of the Shadow (negative values can be used)

Third attribute: Shadow pixel (size)

Fourth attribute: shadow color

Inset is used to set the inner shadow.

Text shadow: text-shadow:

Statement:

<Div class = "shadow"> </div>

. Shadow
{
Width: 300px;
Height: 50px;
Box-shadow: 0px 0px 8px # f00;
}

Effect:

 

Css3 gradient

 

Linear Gradient-from top to bottom

Gradient code:

<Div class = "gradient"> </div>

. Gradient
{
Width: 300px;
Height: 50px;
Background: linear-gradient (top, # ff911b, #000 );
Background:-webkit-linear-gradient (top, # ff911b, #000 );
Background:-o-linear-gradient (top, # ff911b, #000 );
Background:-ms-linear-gradient (top, # ff911b, #000 );
Background:-moz-linear-gradient (top, # ff911b 0, # 000100% );
Filter: progid: DXImageTransform. Microsoft. gradient (startColorstr = '# ff911b', endColorstr = '# 000', GradientType = 0);/* ie6 filter */
}

Effect:

 

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.