How to realize the effect of logo stereo box with CSS:CSS style

Source: Internet
Author: User
Tags relative

Let's see how we can achieve the effect of the stereo box, and then we'll show you some good examples.
Prepare your page and pictures first, we use this picture:
we simply write HTML as this:

<div id= "Container" >

</div>
CSS styles might look like this:

Body{background: #999;}

#container {
width:960px;
Background: #fff;
margin:20px Auto;
padding:10px;
}
Here is an effect preview:
Set to relative positioning, when we position the logo, we want its position to be relative to the container, so use relative positioning:
#container {
width:960px;
Background: #fff;
margin:20px Auto;
padding:10px;
position:relative;
}
Locate it outside the box. Now all you need to do is position the logo, position it horizontally, and make it stand out from the container.

#logo {
Position:absolute;
left:-15px;
}
Now, we can see that the logo has been shown outside the box.

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.