& #183; associate the box-shadow object box shadow and Image shadow in the DIV row,

Source: Internet
Author: User

· Associate box-shadow object box shadows and image shadows in the DIV row,

Box shadow style word: box-shadow

Syntax

<Style>

Div {box-shadow: 0 0 1px #000 inset ;}

</Style>

The first and second 0 indicate the border spacing to the left and the top; 1px indicates the shadow range; #000 indicates that the shadow color is black; inset indicates the shadow in the box, if there is no inset, the shadow outside the box is displayed.

Note that:

Box-shadow: 0px 0px 1px #000
When the value of 1st is 0, it indicates that the shadow of the left and right borders is in the 1px range.
The first value is a positive integer representing the Left Border shadow.
The first value is a negative integer, which indicates the shadow of the right border.
Likewise
When the value of 2nd is 0, it indicates the shadow of the upper and lower borders.
The first value is a positive integer representing the distance between the 1px shadow and the upper border.
The first value is a negative integer, indicating the shadow setting of the lower border.

Div style sets the inner and outer shadows for the div box and image respectively.

① Case HTML code:

<! DOCTYPEHtml>
<Html>
<Head>
<MetaCharset =UTF-8"/>
<Title> Online demonstration of Object Shadow DIVCSS5 VIP </Title>

<Style>... </style>

</Head>
<Body>
<Div> Box Object Shadow test </Div>
<DivClass ="Box"> DIV box shadow </Div>
<Div> Image object shadow test </Div>
<DivClass ="Box2"> <ImgSrc ="151209173820.6.jpg"/> </Div>
</Body>
</Html>

 

② Case style code:

.Box{Box-shadow: 5Px2Px6Px#000Inset;Width300Px;Height: 80Px;}
.Box2 img{Box-shadow: 5Px2Px6Px#000}

Set the shadow effect inside the div object and the shadow effect outside the image respectively.

 

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.