Home > Backend Development > PHP Tutorial > How to make a DIV float above another DIV

How to make a DIV float above another DIV

WBOY
Release: 2016-07-29 09:15:59
Original
1722 people have browsed it

Go to DEMO directly

<span><!</span><span>DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span>></span><span><</span><span>meta </span><span>http-equiv</span><span>="Content-Type"</span><span> content</span><span>="text/html; charset=gb2312"</span><span>/></span><span><</span><span>style </span><span>type</span><span>="text/css"</span><span>></span><span><!-- 
.d1 </span><span>{</span><span>        position</span><span>:</span><span>absolute</span><span>;</span><span>        top</span><span>:</span><span>20px</span><span>;</span><span>        left</span><span>:</span><span>20px</span><span>;</span><span>        width</span><span>:</span><span>200px</span><span>;</span><span>        height</span><span>:</span><span>200px</span><span>;</span><span>        background</span><span>:</span><span>red
        </span><span>}</span><span>.d2 </span><span>{</span><span>        width</span><span>:</span><span>500px</span><span>;</span><span>        height</span><span>:</span><span>100px</span><span>;</span><span>        background</span><span>:</span><span>blue</span><span>;</span><span>}</span><span>
-->
</span><span></</span><span>style</span><span>></span><span><</span><span>div </span><span>class</span><span>="d1"</span><span>></</span><span>div</span><span>></span><span><</span><span>div </span><span>class</span><span>="d2"</span><span>></</span><span>div</span><span>></span>
Copy after login

The above introduces how to make a DIV float on top of another DIV, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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