CSS add shadow effect to Div

Source: Internet
Author: User

Directly on the code:

<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);

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

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

box-shadow:2px 2px 10px #909090;
}
</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

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

The effect is as follows:

From: http://www.cnblogs.com/si-shaohua/p/4279220.html

CSS add shadow effect to Div

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.