Home > Web Front-end > HTML Tutorial > Is the background of the div transparent_html/css_WEB-ITnose

Is the background of the div transparent_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:39:03
Original
1239 people have browsed it

Is the background of the div transparent:

This question is relatively simple, but it may be unfamiliar to beginners. For example, some beginners may think The background color of the div is white because that's how it sometimes looks. The following is an example to prove whether this is the case. The code is as follows:

<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="author" content="http://www.51texiao.cn/" /><title>蚂蚁部落</title><style type="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: 10;}</style></head><body><div class="left"></div><div class="right"></div></body></html>
Copy after login

As can be seen from the performance of the above code, 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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template