CSS Border Shadow

Source: Internet
Author: User

<style type= "Text/css" >
. mydiv{
Width:250px;height:auto;border: #909090 1px solid;background: #fff; color: #333;
Filter:progid:DXImageTransform.Microsoft.Shadow (color= #909090, direction=120,strength=4);/*ie*/
-moz-box-shadow:2px 2px 10px #909090;/*firefox*/
-webkit-box-shadow:2px 2px 10px #909090;/*safari or chrome*/
box-shadow:2px 2px 10px #909090;/*opera or ie9*/
}
</style>

For IE:
Direction shadow angle 0° to clockwise from bottom to top
Strength Shadow Segment length


-moz-box-shadow:2px 2px 10px #909090;
-webkit-box-shadow:2px 2px 10px #909090;
box-shadow:2px 2px 10px #909090;

The first parameter is the length of the x-axis shadow segment
The second parameter is the length of the y-axis shadow segment
The third parameter is the length of the shaded section toward the perimeter
The fourth parameter is the color of the shadow segment
-moz-box-shadow:2px 3px 10px #EBBD2C; -webkit-box-shadow:2px 3px 10px #EBBD2C; box-shadow:2px 3px 10px #EBBD2C

-webkit-box-shadow:0 0 3px #ffffff inset, 0 1px 1px rgba (0,0,0,0.1); -moz-box-shadow:0 0 3px #ffffff inset, 0 1px 1px rgba (0,0,0,0.1); box-shadow:0 0 3px #ffffff inset, 0 1px 1px rgba (0,0,0,0.1);

div Code:
<div class= "Mydiv" >
123123213123
</div>

. shortcodestyle{margin:0px auto;-moz-box-shadow:0px 1px 2px rgba (0, 0, 0, 0.2)-webkit-box-shadow:0px 1px 2px rgba (0, 0, 0, 0.2); box-shadow:0px 1px 2px rgba (0, 0, 0, 0.2); border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;- khtml-border-radius:5px;}

Fillet Border Shadow:
-webkit-border-radius:. 5em; -moz-border-radius:. 5em; Border-radius:. 5em; -webkit-box-shadow:0 1px 2px Rgba (0,0,0,.2); -moz-box-shadow:0 1px 2px Rgba (0,0,0,.2); box-shadow:0 1px 2px Rgba (0,0,0,.2);

-webkit is used in the Chrome browser, generally refers to the browser is the WebKit core
0 0 5px Rgba (40, 173, 243, 0.5);

Four parameters of Box-shadow

X-offset X-axis offset 0
Y-offset y-axis offset 0
Blur blur value 5px
Color of Shadow Shadow color
Rgba (40, 173, 243, 0.5);
RGB is color, a refers to transparency
Red 40, green 173, Blue 243, transparency 50%

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.