The background of the DIV is not transparent

Source: Internet
Author: User

The background of the DIV is not transparent:

This problem is relatively simple, but may be unfamiliar to beginners, for example, some beginners may think that the background color of the div is white, because sometimes it looks like this. Here's an example to show if this is the case. The code is as follows:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.51texiao.cn/" /><title>Ant Tribe</title><styletype= "Text/css">Div{width:100px;Height:100px;position:Absolute;}. Left{ Left:20px;Top:20px;Background-color:#699;Z-index:1;}. Right{ Left:40px;Top:40px;Border:1px solid Red;Z-index:Ten;}</style></Head><Body><Divclass= "Left"></Div><Divclass= "Right"></Div></Body></HTML>

From the above code performance can be seen that the background of the DIV is transparent.

The original address is: http://www.51texiao.cn/div_cssjiaocheng/2015/0508/937.html

The most original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=4682

The background of the DIV is not transparent

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.